2014-05-10 14:54:23 +01:00
|
|
|
# basic sets
|
|
|
|
|
|
|
|
try:
|
|
|
|
frozenset
|
|
|
|
except NameError:
|
|
|
|
print("SKIP")
|
2017-06-10 18:03:01 +01:00
|
|
|
raise SystemExit
|
2014-05-10 14:54:23 +01:00
|
|
|
|
2014-05-11 18:28:48 +01:00
|
|
|
s = frozenset()
|
|
|
|
print(s)
|
|
|
|
|
2014-05-10 14:54:23 +01:00
|
|
|
s = frozenset({1})
|
|
|
|
print(s)
|
|
|
|
|
|
|
|
s = frozenset({3, 4, 3, 1})
|
|
|
|
print(sorted(s))
|
2015-08-28 20:31:31 +01:00
|
|
|
|
|
|
|
# frozensets are hashable unlike sets
|
|
|
|
print({frozenset("1"): 2})
|