从Zed的“艰难地学习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.
"""发布于 2014-06-03 13:04:30
首先,命令是打印的,而不是打印的。此外,尝试自己直接键入“”,而不是从某个地方复制粘贴(如果是这样的话).有些符号看起来非常相似,但仍然不同。
https://stackoverflow.com/questions/24015870
复制相似问题