HELP please! stuck on double_index challenge


i am currently having diffculty understanding what is actually being asked in this question? can anyone help me?
i have attached below the question

thank you

Create a function named double_index that has two parameters named lst and index .

The function should double the value of the element at index of lst and return the new list with the doubled value.

If index is not a valid index, the function should return the original list.

After writing your function, un-comment the call to the function that we’ve provided for you to test your results.


some example function calls:

print(double_index([2, 4, 6], 1)) #should output: [2, 8 , 6]
print(double_index([[2, 4, 6], 5])) # should output: [2, 4, 6]

the first function call, the value at index 1 has doubled.

the second, the index isn’t valid, so the original list should simple be returned


Thank you so much! was really struggling with that one. Got through it now with your help!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.