title: How do I exit a True loop and move on to the next piece of code in python?
body: <p>I am wondering:</p>
  
  <p>First, is it possible to exit a
  <code>while True</code> loop and move onto the next piece of code? This is my
  <code>while True</code> code that I am using:</p>
  
  <pre class="lang-py prettyprint-override"><code>while True:
    b = input("Which row of transition metals would you like to find out the melting and boiling points of? ")
    print("")
    if b == "1" or b == "1st" or b == "first" or b == "First":
      print("First row of transition metals:")
      slg(listA, a)
      again = input("Continue? ")
      if again == "yes":
        continue
    elif b == "2" or b == "2nd" or b == "second" or b == "Second":
      print("Second row of transition metals:")
      slg(listB, a)
      again = input("Continue? ")
      if again == "yes":
        continue
  </code></pre>
  
  <p>Is it possible so that if I had <code>if again == no</code>, it would move on to the next piece of code, exiting the <code>while True</code> loop?</p>