summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/set1.py
blob: 6afd9eb5ef38515df47bc15ae51ac98c12346831 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# basic sets

s = {1}
print(s)

s = {3, 4, 3, 1}
print(sorted(s))

# Sets are not hashable
try:
    {s: 1}
except TypeError:
    print("TypeError")