[Tutor] Finding items in list of lists.

Doug.Shawhan@gecits.ge.com Doug.Shawhan@gecits.ge.com
Mon Mar 17 11:28:03 2003


I am confusing myself.

I have a list that contains the following:

l = [["joe", "moe", "schmoe"], ["fee", "foo", "bar"]]

I wish to check for the existence of both "moe" and "foo" in l. Is there a
clear way to do so using list comprehension, or must I result to something
less friendly?

d