• Python question of the day

    What would be the output of executing the following code:
    def f1(*num): print (num + num)
    f1(4/2)
     4
     4.0
     (2.0), (2.0)
     (2.0, 2.0)
    Explanation:
    If the input is a tuple, it concatenates the elements of the tuple and as all divisions return float, the result is a tuple with floats.


    Top 100 python interview questions:


  • python bootcamp 2021
datai analytics