Embarrasing questio

Aahz aahz at pythoncraft.com
Thu Feb 12 11:11:51 EST 2009


In article <ZKXkl.34048$Sp5.7221 at text.news.virginmedia.com>,
Catherine Heathcote  <catherine.heathcote at gmail.com> wrote:
>
>But I just cant find it. How do I do an or, as in c/c++'s ||? Just 
>trying to do something simple, the python equivilent of:
>
>if(i % 3 == 0 || i % 5 == 0)

if i % 3 == 0 or i % 5 == 0:

You may find it worthwhile to quickly step through everything in the
standard Python tutorial, it covers lots of stuff like this.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.



More information about the Python-list mailing list