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