Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

Alphabetize a List of Names in Python from a list of inputs without being able to use any sort of sort function

$
0
0

I do not have a lot of programing experience, but I've been trying to get a program working were from a number of inputs it can alphabetize a list and print it going up and down without showing any of the steps it does to get to the conclusion. and can't use any sort function in it.

def orgianlAlphabeticalList():     for amountInList in range(len(allInputsInLists)-1, 0, -1):        for i in range(amountInList):            if allInputsInLists[i] > allInputsInLists[i+1]:                allInputsInLists[i], allInputsInLists[i+1] = allInputsInLists[i+1], allInputsInLists[i]                print(allInputsInLists)

This is my function for alphabetizing the list I have not a lot of programing experience


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>