0
Python Boolen
How print(bool("abc")) outout True
2 Answers
+ 5
from... https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/python_booleans.asp
Most Values are True
Almost any value is evaluated to True if it has some sort of content.
Any string is True, except empty strings.
Any number is True, except 0.
Any list, tuple, set, and dictionary are True, except empty ones.
+ 4
Boolean value of empty objects like (), [], {} and 0 is False and otherwise True.