Sections 8 & 10 Hacks
list = [1, 2, 3, 4, 5] # Print this list in reverse orde
print("Original List")
print(list)
print("Reversed List")
list.reverse()
print(list)
list = [9, 8, 4, 3, 5, 2, 6, 7, 1, 0]
print(f"Original {list}")
def insertion_sort(list):
for index in range(1,len(list)):
value = list[index]
i = index - 1
while i >= 0:
if value < list[i]:
list[i+1] = list[i]
list[i] = value
i = i - 1
else:
break
sl = insertion_sort(list)
print(f"Sorted {list}")