# Use a for else for outer in ['blah', 'blah', 'blah']: for inner in outer: if something: break else: # will only run if inner loop did NOT break do_the_rest_of_the_stuff()