I wonder if somebody can explain this to me please. In the following example…
for i in range(0, len(x)):
x[i] = x[i] * 2
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…
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.