"Dick Moores" <[EMAIL PROTECTED]> wrote
But why will a tuple with two elements will always evaluate to
True?
Thats the rule for evaluationg collections in Python.
An empty collection is False. Anything else is therefore true
if []: -> false
if [1,2]: -> true
if (): -> false
if (1,2) - True
if "": -> False
if "foo": -> True
Does that help?
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor