I wonder if somebody can explain this to me please. In the following example…

def my_function(x):

for i in range(0, len(x)):

x[i] = x[i] * 2

return x

print my_function(____) # Add your range between the parentheses!

I’m supposed to fill in the blank using the range method in a way that would result in a list being printed that looks like this…

[0,1,2]

Since range appears to only use integer steps and the functions multiplies by 2 then how can I get the desired result? I seems that if the step could be 0.5 (not an integer) then this would be easy. I could just do range(0,1.5,0.5) or something like that.