compound conditional statements

Jeff Epler jepler at
Mon Sep 15 23:51:00 CEST 2003

On Mon, Sep 15, 2003 at 02:31:06PM -0700, beliavsky at wrote:
> If I have code 
> if (aa or bb): print "true", 
> does Python evaluate aa and bb in any particular order? Can I assume that if 
> aa is true, bb will not be evaluated?


For more information, read the language reference:
    The expression x or y first evaluates x; if x is true, its value is
    returned; otherwise, y is evaluated and the resulting value is


More information about the Python-list mailing list