Hello,

I am learning python and dont quuite understand why is this happening
could someone explain?

alist = [] 
blist = [ 'one','two','one and two','one and four','five','one two']
for f in blist:
        if 'one' and 'two' in f:
                alist.append(f)
   
for i in alist:
    print i

two
one and two
one two


why is it printing the first "two"?

tia


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to