Lesson 8/10 Hacks
array = [1, 2, 3, 4, 5, 6]
array.reverse()
print('Reversed List:', array)
list = [9, 8, 4, 3, 5, 2, 6, 7, 1, 0]
def bubbleSort(list):
n = len(list)
for i in range(n):
for j in range(0, len(list) - i - 1):
if list[j] > list[j + 1]:
value = list[j]
list[j] = list[j + 1]
list[j + 1] = value
bubbleSort(list)
print(list)