SyntaxError: Missing parentheses in call to 'print'. Did you mean print("*" * 78)?
时间: 2024-04-28 14:26:42 浏览: 7
我不太清楚你想问什么,但是根据你所提供的信息,这似乎是一个 Python 的语法错误。这个错误提示说是在打印语句中缺少括号,可能是你在使用 `print` 函数时忘记了加括号。建议你在打印语句中加上括号,像这样:`print("*" * 78)`,这样就可以正确输出 78 个星号了。如果你有其他的问题,请继续问我。
相关问题
SyntaxError: Missing parentheses in call to 'print'. Did you mean print
这个错误是由于在Python3中,print函数需要使用括号,而在Python2中则不需要。因此,如果你在Python3中运行Python2的代码,就会出现这个错误。解决这个问题的方法有两种:
1.在print函数中添加括号,例如:
```python
print('Hello, world!')
```
改为:
```python
print('Hello, world!')
```
2.将Python2的代码转换为Python3的代码。可以使用2to3工具来自动完成这个过程,也可以手动修改代码。
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
This error message is indicating that the code is missing parentheses in a print statement. The correct syntax for a print statement in Python 3.x is to include parentheses around the content to be printed. For example:
Incorrect:
```
print "Hello, world!"
```
Correct:
```
print("Hello, world!")
```
Make sure to add the parentheses around the content to be printed and try again.