I'm trying to build a sudoku game that receives user input and then plays with the user.
when I run the code from Pychram everything works, however when I try to run it from the terminal I get this error: "SyntaxError: invalid token"
I'm using the same input on the same code.
do you know how I might be able to fix it?
the function:
def get_board():
board = []
for idx in range(9):
user_input = str(input(""))
temp_lst = [val for val in user_input]
board.append(temp_lst)
return board
the error:
Traceback (most recent call last):
File "hw5q1.py", line 169, in <module>
main()
File "hw5q1.py", line 165, in main
sudoko()
File "hw5q1.py", line 127, in sudoko
board = get_board()
File "hw5q1.py", line 4, in get_board
user_input = str(input(""))
File "<string>", line 1
034678912
^
SyntaxError: invalid token
The Input:
034678912
672195308
098342567
809061423
426853790
713920056
960537204
287409635
345086109
thanks!