The generally used idiom for that is:
lst = ['a', 'b', 'c'] if 'a' in lst: foo = lst.index('a') -- http://mail.python.org/mailman/listinfo/python-list
The generally used idiom for that is:
lst = ['a', 'b', 'c'] if 'a' in lst: foo = lst.index('a') -- http://mail.python.org/mailman/listinfo/python-list