title: How to break a whole nested loop after inner loop gets an answer
body: <pre><code>for a in range(1,1000):
      for b in range(1,1000):
          c2 = a**2 + b**2
          c = c2**0.5
  
          if a + b + c == 1000:
              answer = a * b * c
              print(answer)
              break
  </code></pre>
  
  <p>answer gets printed twice, meaning the loop still goes after break. How do I stop the whole loop after I get my desired answer?</p>