Modifying each element in a list in a function


#1

I don't know how I got this wrong!

Error: File "python", line 2
def double_list(x)
^
SyntaxError: invalid syntax

Code:

n = [3, 5, 7]
def double_list(x)
for i in range(0, len(x)):
x[i] = x[i] * 2
return x

Don't forget to return your new list!

print double_list(n)


#2

missing colon at the end of that line


#3

Thank you very dearly


#4