My code seems to work even when the required output should be [0, 1, 2]. Can somebody explain to me please.

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

my output is

` [0, 2, 4]`