Stack Overflow Asked by UNA on September 7, 2020
Question: 0 or None and False
why it give me None as answer? I totally don’t understand
I thought None and False should be False because none of them are True, but my python shell tell me it’s None. Why’s that?
You may find this post helpful:
External Discussion on SoloLearn
Example:
None and False
>>> None
False and None
>>> False
0 or None
>>> None
None or 0
>>> 0
It has to do with the behavior of 'and', which checks the first argument before the second (called short-circuit evaluation).
Answered by funyuns on September 7, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP