Python raw_input issue
<p>Here's my code</p>

<pre><code>def player_input():
    input = raw_input('Choose X or O')
    if input == "X":
        print input
    else:
        print 'Please choose an X or an O'
        player_input()

player_input()
</code></pre>

<p>Not sure why I'm getting this. No matter what I type, it seems to jump to the else statement.</p>

<p>Please Choose an X or an O<br>
Choose X or O>? l<br>
Please Choose an X or an O<br>
Choose X or O>? X<br>
Please Choose an X or an O<br>
Choose X or O<br></p>

<p>To your second question answered in the comments</p>

<blockquote>
  <p>Thanks all! Turns out it was an issue with PyCharms interpreter :( As soon as I used the python interpreter on my OS it came out fine. My next issue is using the 'or' comparison. This -> if input == "x" or "X" or "o" or "O": yields the result of only accepting lowercase x. Everything else jumps to the else statement. including X o and O â jmleczko</p>
</blockquote>

<p>In python you have to use </p>

<pre><code>if input == 'x' or input == 'X' or input == 'o' or input == 'O':
</code></pre>

<p>Python does not like it otherwise.
I recommend not to use <code>input</code> as a variable, since input is a system reserved function. </p>

<pre><code>someInput = input("Enter here:")
&gt;&gt;&gt; Enter here: ABC
print(someInput)
&gt;&gt;&gt; ABC
</code></pre>

python