SyntaxError: invalid syntax error occurs when running the Python script file directly in vscode

Error details:

>>> /usr/local/bin/python3 /Users/xxx/leetcode/9.回文数.py
  File "<stdin>", line 1
    /usr/local/bin/python3 /Users/xxx/leetcode/9.回文数.py
    ^
SyntaxError: invalid syntax

Solution:
Clear the contents of TERMINAL and run it again
insert image description here

Guess you like

Origin blog.csdn.net/weixin_46475607/article/details/132149747