涉水The Python Challenge
来源:互联网 发布:数据透视表英文怎么说 编辑:程序博客网 时间:2024/05/16 12:36
在Stack Overflow 上看到学习Python 的一个方法是用Python 破解The Python Challenge。但我喜欢用Ruby,谁管得着呢^_^
0. 入门关很简单。
1. 破解一段话,观察图片很容易发现解码表把字母表循环右移两位。
译文:i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.
再对url ("map")实施变换得"ocr"。
update: 发现String有个内置替换函数tr()。看,多简洁。
2. 查看网页源码,可以看到网页注释中有一堆乱码,上面有句话"find rare characters in the mess below:"(“找出稀少的字符”)。
想到用hash 来统计各个字符的出现次数,并记录首次出现的顺序。
你会得到"equality"。第三关,我来了!
3. 正则表达式。好吧,我承认,我是看了别人的解答。
打死我也想不出来数据在网页源码中(虽然上一题提醒过),而且还是用的正则表达式解。下面是Ruby 版。
4.还没想出来……
- 涉水The Python Challenge
- The python challenge 00
- The python challenge 01
- the python challenge
- The Python Challenge
- the python challenge 解答
- The Python Challenge 题解
- The Python Challenge 0~2
- The Python Challenge Level 0-1 Solutions
- The Python Challenge Level-2 Solution
- The Python Challenge Level-6 Solution
- The Python Challenge Level-3 Solution
- The Python Challenge Level-4 Solution
- The Python Challenge Level-5 Solution
- The Python Challenge Level-7 Solution
- The Python Challenge Level-8 Solution
- The Python Challenge Level 9-10 Solutions
- The Python Challenge Level-11 Solution
- c++让我纠结(说下c++坏话)
- 你永远不应该签的NDA和合同
- What is 老婆!
- 花生壳IP 网上测的IP不一样
- Torque智能指针及临时内存
- 涉水The Python Challenge
- MFC打字训练娱乐程序(一)
- 管理学十类经典定律
- ActiveX技术详解
- cvbdfbaeha
- Using Maven in MyEclipse Overview (Maven4MyEclipse)
- 谁将成为下一个Twitter?最新最酷的创业奇思妙想
- Fedora11下ATI显卡的安装与卸载
- jsp编码