False is a “falsy” value and True is a “truthy” value. Truthy is having a value that has “Truth” (truth-like). Falsy is a value that has falseness (false-like). Furthermore, 1 is a truthy value and 0 is falsy. Translating your expressions leaves us “Truthy and Truthy”, “Fasly and Truthy”.
Based on basic boolean logic, Truthy and Truthy
is True
. Truthy and Falsy
is False
. Lastly, all of the following are equal based on the previous paragraph:
1 and True, True and True
False or 1, False or True
0 and 0, False and False
1 and 0, True and False
9
solved Why Python returns 1 for “True and 1” expression? or False for “False and 1”? [duplicate]