DEV Community

Discussion on: Else clause for Python's for loop

Collapse
 
bl41r profile image
David Smith • Edited

Kind of cool, but I think it would be more readable to separate the loop into its own function, returning true if element.something and returning false otherwise after looping thru. It would be much less confusing to look at, IMO.