Python "and" behavior

goldtech goldtech at worldpost.com
Thu Aug 13 20:36:59 EDT 2009


Could you explain or link me to an explanation of this? Been using
Python for a while but not sure I understand what's happening below.
Thanks.


>>> ss=1 and "fffff"
>>> ss
'fffff'
>>> ss=0 and "fffff"
>>> ss
0
>>>



More information about the Python-list mailing list