# Bubble sort function

def main():
    unorderedList = [34,23,56,89,23,43,55,75,4,2,6,10,11]
    print(bubbleSort(unorderedList))
    
def bubbleSort(aList):
    n = len(aList)
    swapped = False
    while n > 0:
        swapped = False
        for i in range(1, n):
            if aList[i-1] > aList[i]:
                temp = aList[i]
                aList[i] = aList[i-1]
                aList[i-1] = temp
                #aList[i], aList[i-1] = aList[i-1],aList[i]
                swapped = True
        n = n - 1
    return aList

main()

