i have a list that is list = [3, 25, 1] But when i use list.sort(), the output is [1,25,3] I suppose it take it as a string, and order them by their first character... How do i make it sort them by the int order? It is in python 3
Asked
Active
Viewed 34 times
0
-
Please show your code this far – Peter Sep 26 '17 at 21:50
-
sorry, it is in python 3, i am a little new in this page :) – Vicente Espinosa Sep 26 '17 at 21:53
-
`sorted(lst)`. Don't use `list` as a variable. – pylang Sep 26 '17 at 21:54