Answers for "python convert int to bool"

1

python convert int to bool

>>> bool(1)
True
>>> bool(0)
False
>>> int(bool(1))
1
>>> int(bool(0))
0
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language