+ 1
in python 3 i don't understand This ((True == False) or True) please give we some examples also.
print(False == False or True) print(False == (False or True)) print((False == False) or True) print((True == False) or True) print((True == True) or False)
1 Antwort
+ 1
"And" evaluates to True only if *both* conditions are True
"Or" evaluates to True if one or both of the conditions are True
Examples you gave:
- "False == False or True" would be False because "False or True" would evaluate to True
- "(False == False) or True" would be True because "False == False" evaluates to True
- "(True == False) or True" wpuld be True since "True == False" is false, but the True after the 'or' statement makes it true