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