4
u/Aicanaro6558 Aug 20 '25
In the future, try to get rid of single-letter variables, and do not name the variables l and o, as they are very similar to 1 and 0, good luck with programming!
1
3
2
2
u/gigsoll Aug 20 '25
You are stepped on the sorting algorithms road, now you need to implement bogosort and other great ones
1
3
5
u/Capable-Package6835 Aug 20 '25
In Python you can also swap directly without a dummy variable: