Bubble Sort in Python

unsorted_list = [64, 34, 25, 12, 22, 11, 90]
length_of_list = len(unsorted_list)

print(f'unordered list\n{unsorted_list}\nwith indexing[]')
for index in range(length_of_list):
    print(f'{unsorted_list[index]}[{index}] ', end='')
    # deploying bubble sort
    # Swap if the element found is greater than the next element 
    for i in range(0, length_of_list - 1):
        if unsorted_list[i] > unsorted_list[i+1]:
            unsorted_list[i], unsorted_list[i+1] = unsorted_list[i+1], unsorted_list[i]

print(f'\nsorted array/list using bubble sort\n{unsorted_list}')