title: Skip a chunk of code if a condition is True in Python
body: <p>I am writing a workflow which contains many steps, say 100. After each step, I want to check if a condition is True, if True, then skip all steps left and go to the "next level". if it goes all the way to the step 100, then go to the "next level" as well.</p>
  
  <p>I can think of using a for loop with 1 iteration</p>
  
  <pre><code>for i in range(1):
      step1()
      if condition:
          break
  
      step2()
      if condition:
          break
      ...
      step100()
  
  next level()
  </code></pre>
  
  <p>This seems fine, but is there a better way without the loop and jump to <code>next level</code> directly? It will be helpful if there are again this kind of structures within these steps, and I don't want to break many layers of loops to get to the <code>next level</code></p>