title: How do I check raw_input against a list of strings?
body: <p>Here's what I have at this point:</p>
  
  <pre><code>def checkPlayerCardInput(answer):
      while True:
          for x in range(len(player1Cards)):
              if answer.lower() == player1Cards[x]:
                  return player1[x]
  </code></pre>
  
  <p>What I don't know is how to repeat the loop if the user misspells a word or enters something incorrect entirely?</p>
  
  <p>In this scenario, <code>player1Cards</code> is equal to a list of 5 strings. I'm simply trying to match the <code>answer</code> (which is input previously by the user via <code>raw_input</code>) to one of those strings and <code>return</code> that answer (which, in this case, is the item from the <code>player1</code> list that contains the rest of the data for the "card" returned). </p>
  
  <p>If the answer is incorrect, I would like the loop to start with a fresh raw_input answer from the user.</p>