Please can you try to make full sentence. English is not my mother language and currently I don't understand your question.
Do you want to have the order of appending? Then do nothing, task is finished. The order stays in a list.
If you need to sort the items in the list by name (A-Za-z), just use the in-place sort of list.
You can read here more: https://wiki.python.org/moin/HowTo/Sorting
Do you want to have the order of appending? Then do nothing, task is finished. The order stays in a list.
If you need to sort the items in the list by name (A-Za-z), just use the in-place sort of list.
list1 = ['s', 'z', 'd', 'a'] list1.sort() print(list1)If you need the original list and a sorted list:
list1 = ['s', 'z', 'd', 'a'] list2 = sorted(list1) print(list2)If you need a custom order, you have to write your own key-function for sorted.
You can read here more: https://wiki.python.org/moin/HowTo/Sorting
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!