+ 1
How to arrange A - Z names .
Arrange A - Z names like.. Birds , Air , Cat . To.. Air , Birds , Cat
2 ответов
+ 5
You may try sort() method if they are stored in a list.
div = ["Birds", "Air", "Cat"]
div.sort()
print(div)
+ 1
You can use any sorting algorithm.
I have tweaked the bubble sort at the end of the python course to work for your case.
https://code.sololearn.com/cNXyW5Gh0d5D/?ref=app