Mega Code Archive

 
Categories / Python / String
 

Is a character inside a string

myjob = "hacker" print "k" in myjob                   # 1 means true (found) print "z" in myjob                   # 0 means false (not found)