+ 1
recursion
How does line 5 in my code work?https://code.sololearn.com/c6sCEznJy3RB/#py. I do not understand that line of code?
3 Respuestas
+ 5
it calls the function with new parameters until the condition evaluates to false and it won't call itself anymore
+ 2
This code loops, by calling itself, until i==len(a), which is six. So i=0, then adds 1 until i=6. Recursion is calling the define function within itself, it's a loop
https://www.sololearn.com/post/131090/?ref=app
+ 1
i got it after writing the code on paper thanks