Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python convert int to bool

>>> bool(1)
True
>>> bool(0)
False
>>> int(bool(1))
1
>>> int(bool(0))
0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #convert #int #bool
ADD COMMENT
Topic
Name
5+5 =