Answer:
Step-by-step explanation:
def insert(index, item, lyst):
if index == 0:
return [item] + lyst
if len(lyst) == 1:
return lyst[:index] + [item] + lyst[index:]
else:
return lyst[:index] + [item] + insert(0, lyst[index])
1.6m questions
2.0m answers