读书人

Python Challenge Level 一 ~ 2

发布时间: 2013-08-25 10:49:57 作者: rapoo

Python Challenge Level 1 ~ 2

Python Challenge,一个Programming Game的Site,没事玩玩。

?

Level-1:

http://www.pythonchallenge.com/pc/def/map.html

字符字典,先翻译hints。

?

import urllib.requestimport reres = urllib.request.urlopen('http://www.pythonchallenge.com/pc/def/ocr.html').read().decode()matches = re.findall(r'<!--(.*?)-->', res, re.DOTALL)''.join(re.findall(r'[a-zA-Z]', matches[1]))

?得出答案:equality。替换url,顺利进入下一关。

?

读书人网 >perl python

热点推荐