PythonChallenge 挑战之路 Level-6
来源:互联网 发布:ubuntu怎么安装jdk 编辑:程序博客网 时间:2024/05/01 22:04
这一关的提示基本没有,网页源码只有一句一开始被忽视的提示:
<!-- <-- zip -->
用zip替换channel后,只有一句话:yes. find the zip.
可是去哪去找zip呢?没办法,上网搜了一下才知道,原来是用zip替换html(http://www.pythonchallenge.com/pc/def/channel.zip),坑爹啊。这样可以下载一个.zip文件,里面包含了很多的XXXX.txt文件,以及一个readme,看了一下,大致意思和Level-4的问题一样,不过是要用zipfile模块来读文件,稍微修改一下代码,最后的结果是:
Collect the comments.
那么注释又再什么地方呢?再上网搜,原来.zip中的每个文件都包含注释……再修改代码:
import zipfileimport refile = zipfile.ZipFile('channel.zip','r')txtfile = '%s.txt'nothing = 90052output = open('output6.txt','w')while 1>0: text = file.read(txtfile % nothing) a = re.findall(r'(\d+)',text) print text output.write(file.getinfo(txtfile % nothing).comment) if a == []: break nothing = a[len(a)-1]output.close()结果为:
用HOCKEY替换网址,又出现一句提示:
it's in the air. look at the letters. (它在空气中,看看那些字母。)
所以结果就是:OXYGEN(氧气,就是上图中每一行中的字母)
再替换一次,过关:)
- PythonChallenge 挑战之路 Level-6
- Python挑战游戏( PythonChallenge)闯关之路Level- 6
- PythonChallenge 挑战之路 Level-0
- PythonChallenge 挑战之路 Level-1
- PythonChallenge 挑战之路 Level-2
- PythonChallenge 挑战之路 Level-3
- PythonChallenge 挑战之路 Level-4
- PythonChallenge 挑战之路 Level-5
- PythonChallenge 挑战之路 Level-7
- PythonChallenge 挑战之路 Level-8
- PythonChallenge 挑战之路 Level-9
- PythonChallenge 挑战之路 Level-10
- PythonChallenge 挑战之路 Level-11
- PythonChallenge 挑战之路 Level-12
- PythonChallenge 挑战之路 Level-13
- PythonChallenge 挑战之路 Level-14
- PythonChallenge 挑战之路 Level-15
- PythonChallenge 挑战之路 Level-16
- Grub Rescue修复方法
- 图形的保存和重绘
- 网站的上传文件问题
- Maya: 菜单 编辑NURBS >在曲面上投影曲线
- ext2综述
- PythonChallenge 挑战之路 Level-6
- Webservice_21_SOAP的基于契约优先开发用户管理_实现Wsdl
- 数组的顺序表示和实现
- 文件操作
- Maya: 菜单 编辑NURBS >曲面相交
- unity 事件(委托)
- 2013华为校园招聘机试题1
- ext2文件预分配
- 对数据库所有表名的读取