def new_insert(lst, i, e):
lst = lst[:i] + [e] + lst[i:]
a = [0, 1, 2, 3, 4, 6, 7]
new_insert(a, 5, 5)
#Expected output: a = [0, 1, 2, 3, 4, 5, 6, 7]
b = ['0', '1', '0']
new_insert(b, 0, '1')
#Expected output: b = ['1', '0', '1', '0']
new_insert([1,2,3], 1, 0)
#Expected output = None
For the above code, I am unable to get the answer for the newly modified list when adding e into the list. When e = 0, the output should return None. How can I change the code, so that I can get my expected output?