[Tutor] all elements equal in tuple or list

Dick Moores rdm at rcblue.com
Fri Nov 19 19:03:08 CET 2004


Got it. Thanks very much.

Dick

Bob Gailer wrote at 09:37 11/19/2004:
>At 06:59 AM 11/19/2004, Dick Moores wrote:
>>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..
>
>Documentation is part of the Python installation. But you can also go to
>http://www.python.org/doc/
>
>The quote I gave is in the Language Reference. In the TOC under 7 
>Compound Statements click 7.1 The if Statement. Then click one of the 
>expression links which takes you to 5.10 Boolean operations where you 
>find the quote.
>
>>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."
>>
>>Bob Gailer
>>bgailer at alum.rpi.edu
>>303 442 2625 home
>>720 938 2625 cell
>



More information about the Tutor mailing list