Python doesn’t only understand True and False. 👀
It also checks whether a value is truthy or falsy.
bool([]) # False
bool([0]) # True
bool("") # False
bool("0") # True
The interesting part?
"0" is True, but 0 is False. 🤯
Do you know why?
#Python #PythonTips #Coding #Programming
21291.2K

















