2015-04-04 17:05:30 -04:00
|
|
|
# test builtin sorted
|
2017-03-08 18:07:19 -05:00
|
|
|
try:
|
|
|
|
sorted
|
|
|
|
set
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 13:03:01 -04:00
|
|
|
raise SystemExit
|
2015-04-04 17:05:30 -04:00
|
|
|
|
|
|
|
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")
|