Weabu 发表于 2020-9-12 10:47:36

为什么是错的,检查很多遍了

Traceback (most recent call last):
File "<pyshell#37>", line 1, in <module>
    print( "我每天爱你三千遍!" * 3000)
TypeError: 'str' object is not callable
>>> print("我每天爱你三千遍!" * 3000 )
Traceback (most recent call last):
File "<pyshell#38>", line 1, in <module>
    print("我每天爱你三千遍!" * 3000 )
TypeError: 'str' object is not callable
>>> print('我每天爱你三千遍!' * 3000 )
Traceback (most recent call last):
File "<pyshell#39>", line 1, in <module>
    print('我每天爱你三千遍!' * 3000 )
TypeError: 'str' object is not callable
>>>
>>> print('我每天爱你三千遍!' * 3000 )
Traceback (most recent call last):
File "<pyshell#41>", line 1, in <module>
    print('我每天爱你三千遍!' * 3000 )
TypeError: 'str' object is not callable
>>> print("爱你三千遍" * 3000)
      
SyntaxError: invalid character in identifier
>>> print("爱你三千遍" * 3000 )
      
SyntaxError: invalid character in identifier
>>>
>>> print("爱你三千遍!" * 3000 )
      
SyntaxError: invalid character in identifier
>>> print("爱你三千遍!"    *    3000 )
      
SyntaxError: invalid character in identifier
>>> print("爱你三千遍!"*3000 )
      
SyntaxError: invalid character in identifier
>>> print("爱你三千遍!" * 3000 )
      
SyntaxError: invalid character in identifier
>>>    c





求解

qiuyouzhi 发表于 2020-9-12 10:50:17

print的右括号打成中文的了
改成这样
print("爱你三千遍!" * 3000)

胡鸣谦 发表于 2020-9-12 10:54:56

print("爱你三千遍!",end='\n' * 3000)
注意一下,运行这个程序你的电脑可能会死机
页: [1]
查看完整版本: 为什么是错的,检查很多遍了