Question About Logic In Python

James H. james.herdman at
Mon Sep 19 02:20:04 CEST 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

Thank you!


More information about the Python-list mailing list