kopia lustrzana https://github.com/micropython/micropython
14 wiersze
188 B
Python
14 wiersze
188 B
Python
![]() |
l = [1, 3, 2, 5]
|
||
|
print(l)
|
||
|
l.sort()
|
||
|
print(l)
|
||
|
l.sort(key=lambda x: -x)
|
||
|
print(l)
|
||
|
l.sort(key=lambda x: -x, reverse=True)
|
||
|
print(l)
|
||
|
l.sort(reverse=True)
|
||
|
print(l)
|
||
|
l.sort(reverse=False)
|
||
|
print(l)
|
||
|
|