I'm having a problem with searching a list. Here's my code:

mylist = ['x11', 'x11-wm', 'x11-system']

for line in mylist:
        if 'x11' in line:
                print line

This results in the following output:

x11
x11-wm
x11-system

I'm looking to return the list item that just has 'x11'.  How can I 
structure my search term so that this output is returned?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to