2014-01-12 10:54:03 -07:00
|
|
|
s = {1, 2, 3, 4}
|
2014-04-06 22:00:03 -06:00
|
|
|
print(sorted(s))
|
|
|
|
print(sorted(s.intersection({1, 3})))
|
|
|
|
print(sorted(s.intersection([3, 4])))
|
2014-01-12 10:54:03 -07:00
|
|
|
|
|
|
|
print(s.intersection_update([1]))
|
2014-04-06 22:00:03 -06:00
|
|
|
print(sorted(s))
|