Sep-18-2019, 06:19 PM
If you want a sorted version of the list without mutating the original, use
sorted
:>>> l = [3, 1, 2] >>> sorted(l) [1, 2, 3]
list and sort query
|
|
Messages In This Thread |
list and sort query - by arian29 - Sep-18-2019, 02:55 PM
RE: list and sort query - by perfringo - Sep-18-2019, 03:15 PM
RE: list and sort query - by ndc85430 - Sep-18-2019, 06:19 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
How to sort a list with duplicates and return their unique indices. | Echoroom | 3 | 3,604 |
Sep-23-2022, 07:53 AM Last Post: deanhystad |
|
sorting a list using unicodes acending order, no loops, no sort(), using recursion | lrn2codee | 14 | 6,566 |
Jun-23-2021, 07:33 PM Last Post: deanhystad |
|
how to sort a list without .sort() function | letmecode | 3 | 3,510 |
Dec-28-2020, 11:21 PM Last Post: perfringo |
|
[split] Manual Sort without Sort function | fulir16 | 2 | 3,225 |
Jun-02-2019, 06:13 AM Last Post: perfringo |
|
Manual Sort without Sort function | dtweaponx | 26 | 49,375 |
Jun-01-2019, 06:02 PM Last Post: SheeppOSU |
|
Query in list.clear (beginner) | Shaswat | 1 | 1,951 |
Apr-30-2019, 01:54 PM Last Post: ichabod801 |
|
sort a list alphabeticaly without changing the original list | Holmen | 5 | 4,282 |
Jan-27-2019, 01:49 PM Last Post: Holmen |
|
bubble sort random list | atux_null | 7 | 7,998 |
Nov-03-2017, 07:28 PM Last Post: sparkz_alot |