length of a tuple or a list containing only one element

Steve Holden steve at holdenweb.com
Mon Nov 3 15:16:24 CET 2008


bearophileHUGS at lycos.com wrote:
[...]
> Where OR, AND, XOR, NOT, SHL, SHR are the bitwise operators.
> Having to type (| |) often is less handy, for example this code:

Which is precisely why bare parentheses are used. And remember, you
often don't need to put the parentheses in. While this kind of beginner
mistake is common it isn't one that's frequently repeated once the
learner understands the syntax.

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list