Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Perhaps this article will help you: link
The article talks about the sort()
method.
Most likely, you are doing something wrong. I'll show an example:
Если у вас список состоит из чисел, то вывод будет следующим:
number = [1, 10, 5, 11, 2, 4, 20, 21]
number.sort()
Вывод: [1, 2, 4, 5, 10, 11, 20, 21]
Но, если у вас список такой, то вывод будет уже другим:
number = ['1', '10', '5', '11', '2', '4', '20', '21']
number.sort()
Вывод: ['1', '10', '11', '2', '20', '21', '4', '5']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question