+ 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)

10th Jun 2019, 5:14 AM
Rupak Barman
Rupak Barman - avatar
1 Respuesta
+ 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
10th Jun 2019, 6:10 AM
Trigger
Trigger - avatar