Sobes.tech
Junior — Senior

if behavior with logical or with false operands

livecode

Task condition

Determine whether the if branch will execute, given that both condition components evaluate to False (an empty list [] and the number 0). Will the if body be executed in the following code fragment:

a = [] or 0

if [] or 0:
    pass

print(a)