def InsertionSort(l):
for a in range(1, len(l)):
b = a
while (b > 0) and (l[b-1] > l[b]):
l[a], l[b] = l[b], [a]
b -= 1
return l
print(InsertionSort([9, 8, 3, 5, 4, 6, 0, 1, 2]))
Exception has occurred: TypeError
'>' not supported between instances of 'list' and 'int'
File "pp.py", line 13, in InsertionSort
while (b > 0) and (l[b-1] > l[b]):
File "pp.py", line 18, in <module>
print(InsertionSort([9, 8, 3, 5, 4, 6, 0, 1, 2]))
TypeError: '>' not supported between instances of 'list' and 'int'
@amber topaz
@echo zodiac




