Why isn't my code working?


Why does this not work?
The console says:
"Oops, try again. list_function([3, 4]) returned 4 instead of [3, 7]"
Why is that?

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

print double_list(x)


hi, you should check your indention.
It seems there is something wrong with your return-statement.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.