checking if a list is empty

Terry Reedy tjreedy at udel.edu
Sat May 14 16:59:40 EDT 2011


On 5/14/2011 3:45 AM, rusi wrote:

> (True = True) is False

is a syntax error ;-)

and 'True = True' is a (useless) statement,
and statements do not have boolean values,
and 'True == True' *is* True, which is to say,
((True == True) is False) is False.

-- 
Terry Jan Reedy




More information about the Python-list mailing list