Mega Code Archive

 
Categories / Python Tutorial / Collections
 

Membership (in, not in)

s = set('ABC') t = frozenset('CBDEF') print 'k' in s print 'k' in t print 'c'  not in t