/ Published in: Python
Expand |
Embed | Plain Text
>>> bool('spam') True >>> bool('') False >>> bool([]) False >>> bool({}) False >>> bool(1) True >>> bool(0.0) False >>> bool(None) False
You need to login to post a comment.
dorseye on 08/19/09
2 people have marked this snippet as a favorite
>>> bool('spam') True >>> bool('') False >>> bool([]) False >>> bool({}) False >>> bool(1) True >>> bool(0.0) False >>> bool(None) False
You need to login to post a comment.