if variable does not contain py

45

list = ['admin', 'add', 'swear']
st = 'siteadmin'
if any([x in st for x in list]):print "found"
else: print "not found"

Comments

Submit
0 Comments