I have a question on 14/18


#1

So I got it right but I was wondering why at the end it's 0,3,1 instead of 0,2,1

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

print my_function(range(0,3,1)) # Add your range between the parentheses!

If you know why please explain!


#2

Range(starts at this number, ends at BUT does not include, step)

So it isn't 2 because then it would range as [0, 1]. As 3, it is [0, 1, 2]


#3

Thanks! I get it now