TechieInsights wrote:
> On Feb 12, 9:03 am, Catherine Heathcote
> 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)
>>
>> Thanks.
>
> in 2.5 and above you can do
> if any(i%3
Michele Simionato writes:
> On Feb 12, 6:22 pm, MRAB wrote:
>> Michele Simionato wrote:
>> > On Feb 12, 5:07 pm, TechieInsights wrote:
>> >> On Feb 12, 9:03 am, Catherine Heathcote
>>
>> >> wrote:
>> >>> But I just cant find it. How do I do an or, as in c/c++'s ||? Just
>> >>> trying to do som
On Feb 12, 6:22 pm, MRAB wrote:
> Michele Simionato wrote:
> > On Feb 12, 5:07 pm, TechieInsights wrote:
> >> On Feb 12, 9:03 am, Catherine Heathcote
>
> >> 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
Michele Simionato wrote:
On Feb 12, 5:07 pm, TechieInsights wrote:
On Feb 12, 9:03 am, Catherine Heathcote
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)
Thanks.
in 2.5 and above
On Feb 12, 9:19 am, Michele Simionato
wrote:
> On Feb 12, 5:07 pm, TechieInsights wrote:
>
> > On Feb 12, 9:03 am, Catherine Heathcote
>
> > 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
2009/2/12 km :
> Hi,
>
> you could do it this way also :
>
> if i in [3,5]:
> do something...
True, you could do it, but it would be wrong. The original is true for
i = 6, 9, 10, 12 and so on, but yours doesn't seem to be...
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
In article ,
Catherine Heathcote 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 ever
Hi,
you could do it this way also :
if i in [3,5]:
do something...
KM
~
On Fri, Feb 13, 2009 at 1:19 AM, Michele Simionato <
michele.simion...@gmail.com> wrote:
> On Feb 12, 5:07 pm, TechieInsights wrote:
> > On Feb 12, 9:03 am, Catherine Heathcote
> >
> > wrote:
> > >
On Feb 12, 5:07 pm, TechieInsights wrote:
> On Feb 12, 9:03 am, Catherine Heathcote
>
> 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)
>
> > Thanks.
>
> in 2.5 and above
TechieInsights wrote:
On Feb 12, 9:03 am, Catherine Heathcote
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)
Thanks.
if i % 3 == 0 or i % 5 == 0
Yea, new it would be embarras
In article ,
Catherine Heathcote 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
On Feb 12, 9:03 am, Catherine Heathcote
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)
>
> Thanks.
in 2.5 and above you can do
if any(i%3 == 0, i%5 == 0)
--
http://mail.python.
On Feb 12, 9:03 am, Catherine Heathcote
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)
>
> Thanks.
if i % 3 == 0 or i % 5 == 0
--
http://mail.python.org/mailman/listinfo/pyth
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)
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
14 matches
Mail list logo