On 3/14/2011 3:13 PM, Mike Franon wrote:
Thank you everyone who responded, very fast responses I am impressed.
OK now I see where I went wrong and had to do
if (i == 'test1') or (i=='test2'):
I guess I was thinking if I do
a = ['test1', 'flag', 'monday']
for i in a:
It would check each it
On 3/14/2011 1:13 PM Mike Franon said...
Thank you everyone who responded, very fast responses I am impressed.
OK now I see where I went wrong
Well, no, I don't think so. Your first test was:
if i=='test1' or 'test2':
which evaluates as true if _either_ i=='test1' _or_ 'test2'
so, the fi
Thank you everyone who responded, very fast responses I am impressed.
OK now I see where I went wrong and had to do
if (i == 'test1') or (i=='test2'):
I guess I was thinking if I do
a = ['test1', 'flag', 'monday']
for i in a:
It would check each item in the list one at a time like a loop I
On Mon, Mar 14, 2011 at 12:41 PM, Mike Franon wrote:
> HI,
>
> I had a question, when running this small snippet of test code:
>
>
>
> a = ['test1', 'flag', 'monday']
>
> for i in a:
>if i == 'test1' or 'test2':
> print 'true'
>
>
> It always prints true
>
>
> $ ./testing.py
> true
> tr
On 14/03/11 19:41, Mike Franon wrote:
HI,
I had a question, when running this small snippet of test code:
a = ['test1', 'flag', 'monday']
for i in a:
if i == 'test1' or 'test2':
print 'true'
It always prints true
$ ./testing.py
true
true
true
I know I am missing something,
On 03/14/2011 03:41 PM, Mike Franon wrote:
> HI,
>
> I had a question, when running this small snippet of test code:
>
>
>
> a = ['test1', 'flag', 'monday']
>
> for i in a:
> if i == 'test1' or 'test2':
if i == 'test1' or i == 'test2'
>print 'true'
> I know I am missing something
HI,
I had a question, when running this small snippet of test code:
a = ['test1', 'flag', 'monday']
for i in a:
if i == 'test1' or 'test2':
print 'true'
It always prints true
$ ./testing.py
true
true
true
I know I am missing something, but in reality it should only print
true