• Python question of the day

    What would be the output of executing the following code:
    print(0.0 or 0)
    In python, the general rule is: a and b is b if a is true, else it is a; a or b is a if a is true, else it is b. Now, False, None, (), [], {}, '', 0 and 0.0 are all considered false; practically everything else is true.

    Top 100 python interview questions:

  • python bootcamp 2021
datai analytics