I just watched a Khan Academy video on Insertion Sort and I've tried to write an implementation in Python. Please suggest corrections or improvements on this program:
unsorted_list=[45,99,1,-22,7,3,294,10,36]
def insertion_sort(unsorted):
for i in range(1,len(unsorted)):
for j in range(i):
if unsorted[i]<unsorted[j]:
temp = unsorted[j]
unsorted[j]=unsorted[i]
unsorted[i]=temp
return unsorted
print insertion_sort(unsorted_list)