did_something = False
for element in elements:
if element.something:
do_something()
did_something = True
break
if not did_something:
do_something_else()
`
did_something = False
for element in elements:
if element.something:
do_something()
did_something = True
break
if not did_something:
do_something_else()
`
Top comments (0)