I am currently working on a Python 2 exercise called Modifying each element in a list in a function in the List and Functions section of this course.
I cannot understand the solution to this question. Can someone please provide a clear and logical explanation as to why the solution is this:
n = [3, 5, 7]
for i in range(0, len(x)):
x[i] = x[i] * 2
Don’t forget to return your new list!
Thank you very much to all those who take the time to answer. Appreciate it!