summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/builtin_sorted.py
blob: a4f71a15ebeb2f97db3ce3fafa0e2949728df591 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# test builtin sorted

print(sorted(set(range(100))))
print(sorted(set(range(100)), key=lambda x: x + 100*(x % 2)))

# need to use keyword argument
try:
    sorted([], None)
except TypeError:
    print("TypeError")