''' explain to me, using python examples, how to implement bubble sort ''' def bubble_sort(lst): n = len(lst) # Traverse through all array elements for i in range(n): # Last i elements are already in place for j in range(0, n-i-1): # Traverse the array from 0 to n-i-1 # Swap if the element found is greater than the next element if lst[j] > lst[j+1]: lst[j], lst[j+1] = lst[j+1], lst[j] # Example usage lst = [64, 34, 25, 12, 22, 11, 90] bubble_sort(lst) print("Sorted array is:") for i in range(len(lst)): print("%d" % lst[i])