Python LanguageUsing loops within functions
In Python function will be returned as soon as execution hits "return" statement.
Return statement inside loop in a function
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0