from re import search fullstring = "StackAbuse" substring = "tack" if search(substring, fullstring): print "Found!" else: print "Not found!"
if "blah" in somestring: continue
if "hello" not in array: