You can use the in operator:

if "blah" not in somestring: 
    continue