Hi, I need help in identifying error in the code below.
#The function should return a new list where all elements are the same as in 'lst' except for the element at 'index', which should be double the value of the element at index of lst.
def double_index(lst, index):
temp_lst = []
for i in range(len(lst)):
if i != index:
temp_lst[i] = lst[i]
else:
temp_lst[i] = 2 * lst[i]
return temp_lst
print(double_index([2, 3, 8, 9, 10, 1], 3))