Mega Code Archive

 
Categories / Python Tutorial / Collections
 

How to Access Values in Sets

s = set('ABC') print s t = frozenset('BCD') print t print 'k' in s print 'k' in t print 'c' not in t for i in s:    print i