Help! end='' is causing a syntax error and I'm not sure why.
def print_game_board(game_board_marker):
for i in range(len(game_board_marker)):
for j in range(len(game_board_marker[i])):
print(str(game_board_marker[i][j]).rjust(4), end='')
print()
print()
It seems like you're using Python 2.x, not 3.x.
Check your python version:
$ python -V
Python 2.7:
>>> print(1, end='')
File "<stdin>", line 1
print(1, end='')
^
SyntaxError: invalid syntax
Python 3.3:
>>> print(1, end='')
1>>>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With