14/18 Passing a range into a function


Hey guys, whats wrong with my code? I tried everything and i cant get the answer...
Checked the forum, my code seems to be ok.

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


Hi @rybecki.
Make sure you indented your code well.
when a new block starts ,you need to space it out by 4 spacebars.


It is indented well. Still don`t know what to do... :frowning:


Format your code.

When I tested your code after fixing the indentation ,It lets me pass.


Hey guys, you were right. Indentation was wrong. Thanks for help!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.