SyntaxFix
Write A Post
Hire A Developer
Questions
You need to iterate on the elements of a.
a = ['a', 'b', 'c'] str = "a123" found_a_string = False for item in a: if item in str: found_a_string = True if found_a_string: print "found a match" else: print "no match found"