欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

pythonchallenge第二关

程序员文章站 2024-02-12 17:37:34
...
http://www.pythonchallenge.com/pc/def/map.html

作为第二关给出了一个提示

K->M
O->Q
E->G

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.

上代码:


str1="""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."""

str2="abcdefghijklmnopqrstuvwxyz"
str3="cdefghijklmnopqrstuvwxyzab"

from string import maketrans
print str1.translate(maketrans(str2,str3))

print "map".translate(maketrans(str2,str3))




得出map偏移后的值为OCR


得出下关地址:

http://www.pythonchallenge.com/pc/def/ocr.html
相关标签: Python HTML