circuitpython/tests/basics/frozenset1.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
257 B
Python
Raw Normal View History

# basic sets
try:
frozenset
except NameError:
print("SKIP")
raise SystemExit
s = frozenset()
print(s)
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})