What is the reason from different output generate using logical 'and' and 'or' operator in Python 3.10.8

ICT Ezy ictezy at gmail.com
Mon Nov 7 01:01:08 EST 2022


Please explain how to generate different output in following logical operations
>>> 0 and True
0
>>> 0 or True
True
>>> 1 and True
True
>>> 1 or True
1


More information about the Python-list mailing list