def double_index(lst, index):
if index >= len(lst):
before_index_element = lst[:index]
double_of_element = [2*lst[index]]
after_the_element = lst[index+1:]
new_lst = str(before_index_element + double_of_element + after_the_element)
Hi, my answer is coming out right but still it’s showing " Double the value at position
lst" error and has wronged the code(showing a cross).
What do you think of this?