title: Why is my function returning the wrong value on certain conditions?
body: <p>I have a function named getFirstPlayer. The user must enter either B (for black) or W (for white). </p>
  
  <p>Everything works as intended, but only when an accepted value is initially entered. Unaccepted values (anything other than W, w, B, b) are recognized and the function is called again, and then when a user inputs an accepted value, nothing is returned.</p>
  
  <p>For example:</p>
  
  <p><code>A
  Specify which player will move first: B for black, W for white
  C
  Specify which player will move first: B for black, W for white
  B
  </code>
  Returned value: None</p>
  
  <p>However, when you input "B" on the first try, the integer 1 is correctly returned.</p>
  
  <pre><code>def getFirstPlayer() -&gt; int:
      while True:
          try:
              firstPlayer = str(input())
  
              if firstPlayer == 'W' or firstPlayer == 'w':
                  return 2
              elif firstPlayer == 'B' or firstPlayer == 'b':
                  return 1
              else:
                  print("Specify which player will move first: B for black, W for white")
                  getFirstPlayer()
  
          except ValueError:
              print("Specify which player will move first: B for black, W for white")
              continue
          else:
              break
  </code></pre>
  
  <p>What am I doing wrong?</p>