python3.3.1 pythonchallenge 通关之level 3
来源:互联网 发布:淘宝9块9包邮报名资格 编辑:程序博客网 时间:2024/05/21 17:13
紧接着level2,进入level3。突然发现这样挺好玩的,一边解谜一边直播blog,带感啊~上图:
根据level2的经验,直接看html代码,发现果然还是这样:
还是tornado搞起:
import tornado.httpclientdef small(a):if a>='a' and a<='z':return Trueelse:return Falsedef big(a):if a>='A' and a<='Z':return Trueelse:return Falsecli=tornado.httpclient.HTTPClient()data=cli.fetch('http://www.pythonchallenge.com/pc/def/equality.html')new=data.body.decode('utf8')pos=new.find('<!--')new=new[pos+4:]for i in range(len(new)):if big(new[i]) and big(new[i+1]) and big(new[i+2]) and small(new[i+3])\and big(new[i+4]) and big(new[i+5]) and big(new[i+6])\and small(new[i+7]):if small(new[i-1]):print(new[i+3])
“EXACTLY”的真正意思就是:小大大大小大大大小 ,只有这样中间的小写字母才是有用的。我不会用正则表达式,写了3行的and,哈哈~之后一定写一个正则的使用贴。输出如下:
linkedlist
又是换链接哈,linkedlist.html,这时转到的页面提示用php,改成linkedlist.php进入level4 。直播还继续吗?再搞一个吧~哈
转载请注明:转自 http://blog.csdn.net/littlethunder/article/details/8936748
- python3.3.1 pythonchallenge 通关之level 3
- python3.3.1 pythonchallenge 通关之level 1
- python3.3.1 pythonchallenge 通关之level 2
- python3.3.1 pythonchallenge 通关之level 4
- PythonChallenge 挑战之路 Level-3
- PythonChallenge Level 3
- Python挑战游戏( PythonChallenge)闯关之路Level- 3
- pythonchallenge通关记录
- PythonChallenge 挑战之路 Level-0
- PythonChallenge 挑战之路 Level-1
- PythonChallenge 挑战之路 Level-2
- PythonChallenge 挑战之路 Level-4
- PythonChallenge 挑战之路 Level-5
- PythonChallenge 挑战之路 Level-6
- PythonChallenge 挑战之路 Level-7
- PythonChallenge 挑战之路 Level-8
- PythonChallenge 挑战之路 Level-9
- PythonChallenge 挑战之路 Level-10
- Android - LayoutInflater
- 历史名人2——居鲁士
- Unity3D 事件处理函数
- JVM中MemoryUsage中init,committed,used,max的含义
- hdu_2167_Pebbles
- python3.3.1 pythonchallenge 通关之level 3
- go语言学习---错误
- c# 文件的编译
- MVC4角色授权
- 地址空间
- Cisco与Linux的NAT
- POJ 1125 Stockbroker Grapevine Floyd算法
- 在window中写一个死循环批处理
- oracle