[Tutor] all elements equal in tuple or list

Dick Moores rdm at rcblue.com
Fri Nov 19 19:40:48 CET 2004


Brian van den Broek wrote at 07:36 11/19/2004:
>Dick Moores said unto the world upon 2004-11-19 08:59:
>>I've been unable to find this. Could you give the URL for the page? I 
>>figure there must be more good stuff near there..
>>Thanks,
>>Dick
>>Bob Gailer wrote at 22:45 11/18/2004:
>>
>>>To be more explicit (quoting from the manual) "when expressions are 
>>>used by control flow statements, the following values are interpreted 
>>>as false: None, numeric zero of all types, empty sequences (strings, 
>>>tuples and lists), and empty mappings (dictionaries). All other values 
>>>are interpreted as true."
>
>Hi Dick,
>
><http://www.google.ca/search?num=50&hl=en&q=site%3Awww.python.org+%22when+expressions+are+used+by+control+flow+statements%22&btnG=Search&meta=>
>
>Since that isn't too readable, that's the result of typing:
>
>site:www.python.org "when expressions are used by control flow statements"
>
>into google's search box.
>
>Best,
>
>Brian vdB

Hey, good trick! I'll use it next time.

Thanks,

Dick




More information about the Tutor mailing list