Sorry - my mistake - try:
infile = open("filex")
match_zips = open("zippys")
result = [line for line in infile if line in match_zips]
print result
ok....Thanks...This should do it:
#!/usr/bin/env python
infile = open("filex")
zips = open("zippys")
match_zips = zips.readlines()
results = [line for line in infile if line in match_zips]
print results
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor