• Python question of the day

    What would be the output of executing the following code:
    curr_rate, curr_state = 0, True
    print (not(curr_rate) + curr_state)
     1
     2
     True
     False
    Explanation:
    In python, not(curr_rate) evaluates as False since curr_state is 0


    Top 100 python interview questions:






datai analytics