0

My code:

print(player_cards[card], end = ", ")

And this is the error message I got:

File "--------", line 97
print(player_cards[card], end = ", ")
                              ^
SyntaxError: invalid syntax

It works perfectly in Pycharm and IDLE, I got this message only when I run it in terminal(Mac)

Sushi6006
  • 29
  • 9

1 Answers1

2

When you are in the terminal, do:

python --version

Compare it to the other versions.

I suspect you are running python 2 in the terminal. In that case, run the appropriate python version in the terminal, and it will work just as well.

DevShark
  • 8,558
  • 9
  • 32
  • 56