Iterating over a list in function


#1

can anyone explain what this question asking and how to solve this question . I didnot understand the question :(


#2

a function ends the moment a return keyword is reached, if this happens in a loop the loop simply breaks

Your loop breaks at the end of the first iteration


#3

So how do I mark the FOR-LOOP block ?

I searched the Internet and I cannot find an answer! Seems all instructions are for a loop that does not have a RETURN after it.. :slight_smile:


#4

I think you need to look lesson "Python Syntax 5.Whitespace" once again :wink:


#5

Thanks!:slight_smile:
I am obviously doing it wrong... :relaxed:


#6

did you figure it out?


#8

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