s = set(['a', 'a', 'b', 'c', 'd']); # {'b', 'a', 'd', 'c'}
s2 = set(['a', 'd', 'e', 'f']); # {'a', 'e', 'd', 'f'}
#access element
for e in s:
print(e, end=' ')
print()
print(s|s2) #union, {'e', 'b', 'a', 'd', 'f', 'c'}
print(s&s2) #intersection, {'a', 'd'}
print(s-s2) #difference, {'b', 'c'}
s.add('g'); # {'g', 'b', 'a', 'd', 'c'}
s.remove('d'); #remove element; raise KeyError if not present
s.discard('c'); #remove if present
s.pop(); #remvoe an arbitrary element
print(s.issuperset(set(['b']))) # True
print(set(['b']).issubset(s)) # True