0%

Python Challenge (Level 23)

第23关

网页title是what is this module?,Page Source里面有这么一句:‘va gur snpr bs jung?’,看起来有点像string.translate那一关。搜索一下这句话,就会看到得到通关信息。要用到this模块,this就是一个模块名。根据this.py的内容,得到translate的规则是平移13位。

1
2
3
4
5
6
7
8
import this
import string

msg = 'va gur snpr bs jung'
frm = string.ascii_lowercase
to = string.ascii_lowercase[13:] + string.ascii_lowercase[0:13]
table = string.maketrans(frm, to)
print msg.translate(table)

得到in the face of what,对应import this时打印出来的一串信息,what就是ambiguity. http://www.pythonchallenge.com/pc/hex/ambiguity.html