Ser*_*tae -3 python syntax-error
这是错误,我不知道错误在哪里:
> & C:/Users/tanel/AppData/Local/Programs/Python/Python38/python.exe
"c:/Users/tanel/Documents/Projects/Coding/Python/Game Alien/game.py"
File "<stdin>", line 1
& C:/Users/tanel/AppData/Local/Programs/Python/Python38/python.exe "c:/Users/tanel/Documents/Projects/Coding/Python/Game Alien/game.py"
^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)
你得到一个 PythonSyntaxError是因为你试图在 Python shell 中运行一个 PowerShell 命令:
>>> & C:/Users/tanel/AppData/Local/Programs/Python/Python38/python.exe "c:/Users/tanel/Documents/Projects/Coding/Python/Game Alien/game.py"
Run Code Online (Sandbox Code Playgroud)
exit退出该外壳,然后在 PowerShell 中运行您的 PowerShell 命令。提示应该看起来像
PS C:\>
Run Code Online (Sandbox Code Playgroud)
Python shell 用于以交互方式运行代码,例如,您可以输入类似的内容import pygame或print("Hello, world!")直接输入其中的内容。
| 归档时间: |
|
| 查看次数: |
10798 次 |
| 最近记录: |