I am new to python and learning from CodeAcademy.com; I have a problem:
Change list_function so that:
- Add 3 to the item at index one of the list.
- Store the result back into index one.
- Return the list.
Here is my code:
def list_function(x):
return x
n = [3, 5, 7]
n.insert(1,3)
print list_function(n)
I get only the error, what should i do?
My problem is to understand the number 2 and 3 option.