Hi everyone,

I think I'm having a hard time understanding what the return statement consists in. If someone could help me understand it that would be great.

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

this is definitely not the same as this:

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

But I'm not sure I can explain it, I might be a bit confused about the return statement.

Tell me if I'm wrong:

the return statement ends the execution of a function, right? that means that in the second part of code, as return is inside the for loop, the loop will stop running after i=0 . And thus doesn't have the time to double each element inside the list.

Then my second question:

In the first case of my code, why do we need to put "return x" at the end of the function? If we hadn't, wouldn't we still have each element of the list multiplied by 2?

Not sure I was very clear here, if not, please tell me and I'll explain it again

Thanks for your help!