从Zed Shaw的学习Python开始练习9。我收到以下错误:
File "ex9.py", line 14
"""
^
SyntaxError: invalid syntax
这里是完整的代码:
# Here's some strange new stuff, remember to type it exactly.
days = "Mon Tue Wed Thu Fri Sat Sun"
months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec"
print "Here are the days: ", days
print "Here are the months ", months
Print """
There's something going on here.
With the three double-quote.
We'll be able to type as much as we like.
Even 4 lines if we want, or 5, or 6.
"""
答案 0 :(得分:0)
首先,命令是打印,而不是打印。 此外,尝试直接键入“”“,而不是从某处复制粘贴(如果是这种情况)......某些符号看起来非常相似,但仍然不同。