An entirely different approach would be to use a regular expression:
import re if re.search("[abc]", "nothing expekted"): print "a, b or c occurs in the string 'nothing expekted'" if re.search("[abc]", "something expected"): print "a, b or c occurs in the string 'something expected'" Best regards, Stefaan. -- http://mail.python.org/mailman/listinfo/python-list