<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
My code behaves fine…but the list printed is [0, 2, 4] and the lesson asks me to return a list with [0, 1, 2]
<What do you expect to happen instead?>
I understand the difference between return and print, however the function looks like this:
for i in range(0, len(x)):
x[i] = x[i] * 2
So if I pass a range of 3 into the function, it takes 0, 1, and 2 and doubles them, and then returns the list. Since the doubling happens before the return, isn’t it actually RETURNING a list of [0, 2, 4]?
If so, it would seem that this code fails to return a list of [0, 1, 2], but yet the website counts this as correct. I don’t understand this.```python
Replace this line with your code.
<do not remove the three backticks above>