question about True values
Ben Finney
bignose+hates-spam at benfinney.id.au
Wed Oct 25 22:25:35 EDT 2006
Steve Holden <steve at holdenweb.com> writes:
> skip at pobox.com wrote:
> > Each of the builtin types has such an "empty" or "nil" value:
> >
> > string ""
> > list []
> > tuple ()
> > dict {}
> > int 0
> > float 0.0
> > complex 0j
> > set set()
> >
> > Any other value besides the above will compare as "not false".
>
> And today's question for the novices is: which Python type did Skip
> miss from the above list?
Is it cheating if I read this page:
<URL:http://docs.python.org/lib/truth.html>
--
\ "I always wanted to be somebody. I see now that I should have |
`\ been more specific." -- Lily Tomlin |
_o__) |
Ben Finney
More information about the Python-list
mailing list