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