title: What is going wrong with this Tic-Tac-Toe game code?
body: <p>I'm trying to make a Tic-Tac-Toe game for Python, and the board isn't changing when it should.</p>
  
  <p>I've verified that the code inside the if statement is being run, so I know that isn't the problem.</p>
  
  <pre class="lang-py prettyprint-override"><code>#defines the Tic-Tac-Toe board (dictionary)
  board={'L1':' ','M1':' ','R1':' ',
         'L2':' ','M2':' ','R2':' ',
         'L3':' ','M3':' ','R3':' '}
  #if the computer or the player are about to get three in a row (this is only one of the many combinations I added)
  if board['L1']==board['L2']!=' ' and board['L3']==' ':
      #x1 is a variable that determines if the player is X's or O's (first or second)
      if x1==1:
          board['L3']=='O'
          else:
              board['L3']=='X'
          #board
          played=1
  </code></pre>
  
  <p>Here's the link to my full code: <a href="https://repl.it/repls/BruisedBusyGraph" rel="nofollow noreferrer">https://repl.it/repls/BruisedBusyGraph</a> (Try running it with difficulty level 2)</p>
  
  <p>I expected the board to change its L3 attribute to either X or O after the code was run, but it stayed blank even after running the if statement.</p>