我是一个蟒蛇新手。我想知道为什么我会收到这个错误:
File "python-challenge-1.py", line 12
print original.translate(table)
^
SyntaxError:语法无效
以下是完整代码:
import string
original = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc " \
"dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq " \
"rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu " \
"ynnjw ml rfc spj."
table = string.maketrans(
"abcdefghijklmnopqrstuvwxyz", "cdefghijklmnopqrstuvwxyzab"
)
print original.translate(table)