查看网页源码,看到内部注释,找到里面出现的字母
http://www.pythonchallenge.com/pc/def/ocr.html
http://www.pythonchallenge.com/pc/def/equality.html
代码如下:
map = {}
str = ''
with open("ocr.txt") as file:
for i in file.read():
if i.isalpha():
str += i
print(str)
官方解答:
http://wiki.pythonchallenge.com/index.php?title=Level2:Main_Page