Bubble Sort (Simple)

def bubblesortsimp(lst):
    for y in range(len(lst) - 1):
        for x in range(len(lst) - 1):
            if lst[x] > lst[x + 1]:
                swap(lst, x, x + 1)
Advertisements