Mega Code Archive

 
Categories / Python Tutorial / String
 

To check whether a value can be found in a sequence, you use the in operator

permissions = 'rw'  print 'w' in permissions  print 'x' in permissions    subject = '$$$ Get rich now!!! $$$'  print '$$$' in subject