首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

Python Challenge Level 一 ~ 2

2013-08-25 
Python Challenge Level 1 ~ 2Python Challenge,一个Programming Game的Site,没事玩玩。?Level-1:http://ww

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,顺利进入下一关。

?

热点排行