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 once correct?


Thanks in advance
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to