title: While loop in python allowing only one of two responses
body: <p>I have a while loop that I want to restrict on one of two answers. One would continue the loop and the other would break out of it. The catch is that the code is similar to the following:</p>
  
  <pre><code>choice = "y"
  while choice == "y":
      if condition:
          print ("something")
      choice = input("continue?")
  </code></pre>
  
  <p>I want to allow only y or n answers all else should prompt again. Please help. I have found several things close, but when I try I get an infinite loop for the prompt.</p>