Let's break down the expression:
a = True
b = False
print(a == b or not b)
a == b: This checks if the value of a is equal to the value of b. In this case, True == False evaluates to False.
not b: This negates the value of b. Since b is False, not b evaluates to True.
a == b or not b: The or operator returns True if at least one of the conditions is True. In this case, False or True evaluates to True.
So, the output of the print statement will be True.
0 Comments:
Post a Comment