I am currently learning python as my first programming language and thought I had the knowledge and wanted to challenge myself to create tic-tac-toe. I have the code working to the point where it starts the game and the first move is requested but when I try to print the new board it doesn't print with he space filled out.
L1 = " "
def board():
print(" | | ")
print(" ",L1," | ",M1," | ",R1," ")
print(" | | ")
print("-----------------")
print(" | | ")
print(" ",L2," | ",M2," | ",R2," ")
print(" | | ")
print("-----------------")
print(" | | ")
print(" ",L3," | ",M3," | ",R3," ")
print(" | | ")
Xmove = input("Where does X want to go? ")
def xmove(Xmove):
if Xmove == ("L1"):
L1 = "X"
board()
xmove(Xmove)
This should be printing the new board with the top left space now an "X" but it isn't. It just prints a blank board.