+ 1
I don't understand this code
Why is the result 0? #what is the highest number output def a(x): for i in range(x): print(i) return a(10)
2 Answers
+ 2
The return statement will end the function, so the loop only goes through the first iteration, only outputing the 0.
+ 1
Thanks!