hi guys can u help me
idky when i print this code, there's the None printed too. how do i get rid of the none thingy when i print my result?
this is my code:
and i got:
idky when i print this code, there's the None printed too. how do i get rid of the none thingy when i print my result?
this is my code:
def insertionSort(my_list):
for i in range (1, len(my_list)):
current_element= my_list[i]
a = i
while current_element < my_list[a-1] and a>0 :
my_list[a] = my_list[a-1]
a = a-1
my_list[a] = current_element
for i in range (1,21):
y=[(5*i+2)%37]
print(y)
print(insertionSort(y)) and i got:
Output:[7]
None
[12]
None
[17]
None
[22]
None
[27]
None
[32]
None
[0]
None
[5]
None
[10]
None
[15]
None
[20]
None
[25]
None
[30]
None
[35]
None
[3]
None
[8]
None
[13]
None
[18]
None
[23]
None
[28]
None
