I don’t understand in this function why I need to be using x[i] vs. i

n = [3, 5, 7]

def double_list(x):

for i in range(0, len(x)):

x[i] = x[i] * 2

return x

print double_list(n)

Why can’t I just use i?

E.g.

n = [3, 5, 7]

def double_list(x):

for i in range(0, len(x)):

i = i * 2

return x