When I try to run my code it returns with none.
def gnomeSort(lis):
i = 0
n = len(lis)
while i < n:
if i and lis[i] < lis[i-1]:
lis[i], lis[i-1] = lis[i-1], lis[i]
i -= 1
else:
i += 1
return
lis = [1,3,5,20,19,30,2,6,19,23,31,90,44,62,69,21,78,89,64]
print(gnomeSort(lis))
When I run this it returns with "None", even though I provided a list to be sorted.