def bubble_sort(items):
    num_items = len(items)
    if num_items < 2:
        return items
    while num_items > 0:
        for k in range(num_items):
            try:
                if items[k] > items[k + 1]:
                    copy = items[k]
                    copy_next = items[k + 1]
                    items[k] = copy_next
                    items[k + 1] = copy
                elif items[k] == items[k + 1]:
                    continue
            except __HOLE__:
                continue
        num_items -= 1
    return items
dataset/ETHPy150Open christabor/MoAL/MOAL/algorithms/sorting/bubble_sort.py/bubble_sort