def list_function(x):

return x[1]

x[1] = x[1] + 3

return x

n = [3, 5, 7]

print list_function(n)

What's wrong with my code?

Could you please figure it out? Thanks

def list_function(x):

return x[1]

x[1] = x[1] + 3

return x

n = [3, 5, 7]

print list_function(n)

What's wrong with my code?

Could you please figure it out? Thanks

As soon as you call "return" the program leaves the function.

anything below "return" will *not* we executed.

`def list_function(x):

x[1] = x[1] + 3

return x

n = [3, 5, 7]

print list_function(n)`

this should work

def list_function(x):

return x[1]

n = [3, 5, 7]

def list_function(n):

n[1]=n[1]+3

return n

print n

Nothing worked, but this did work for me... Its a function you need to create