Question About Logic In Python

James H. james.herdman at gmail.com
Sun Sep 18 20:20:04 EDT 2005


Greetings!  I'm new to Python and am struggling a little with "and" and
"or" logic in Python.  Since Python always ends up returning a value
and this is a little different from C, the language I understand best
(i.e. C returns non-zero as true, and zero as false), is there anything
I should be aware of given Python's different approach?  Namely any
pitfalls or neat tricks that make the Python approach cool or save my
butt.

Thank you!

James




More information about the Python-list mailing list