Your function can only return once, so you need to back it out of the for loop. As written, your function currently will return x after the first iteration, so none of the remaining elements are modified.
def double_list(x):
for i in range(0, len(x)):
x[i] = x[i] * 2
return x
An alternative, by the way, is to use a simple list comprehension, this will not modify the original list and will create a new one that you can assign back to the original variable if you'd like
def double_list(x):
return [i*2 for i in x]
>>> n = [3, 5, 7]
>>> n = double_list(n)
>>> n
[6, 10, 14]
If you prefer to modify the actual list argument, you can use change the function to
def double_list(x):
for index, value in enumerate(x):
x[index] = 2 * value
>>> n = [3, 5, 7]
>>> double_list(n)
>>> n
[6, 10, 14]