Modifying each element in a list in a function


I really don't know what I am doing wrong here> Someone help me with this.


a function ends the moment a return keyword is reached, if a return keyword is reached in a loop, the loop will break, your loop breaks in its first iteration


In line 6, you have to "return x" outside of "for " loop.
It will sort out.


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