python挑战之level 23
来源:互联网 发布:dnf卡史诗软件 编辑:程序博客网 时间:2024/05/29 18:57
连接:http://www.pythonchallenge.com/pc/hex/bonus.html
登陆密码;(butter,fly)
——————————————————————————————————————————————————————
这是一头牛的图片,看看其他的信息:
标题:what is this module?
注释:
<!-- TODO: do you owe someone an apology? now it is a good time to tell him that you are sorry. Please show good manners although it has nothing to do with this level. --><!-- it can't find it. this is an undocumented module. --><!-- 'va gur snpr bs jung?' -->——————————————————————————————————————————————————
这个是什么意思呢?让我们道歉?并且这是一个无证模块?后面的乱码是什么啊?
百度一下;
‘this'竟然是一个模块,就是undocmented module.,这也是个脑筋急转弯!是吧?
在this模块中有一个字典,存放着字符的转换,所以我们使用this.d来解密乱码
<pre name="code" class="python">import this,strings='va gur snpr bs jung?'.upper()d=''for i in s: if i in string.ascii_uppercase: d += this.d[i] else: d+=iprint(d.lower())
————————————————————————————————————————————————————
结果为:
The Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat is better than nested.Sparse is better than dense.Readability counts.Special cases aren't special enough to break the rules.Although practicality beats purity.Errors should never pass silently.Unless explicitly silenced.In the face of ambiguity, refuse the temptation to guess.There should be one-- and preferably only one --obvious way to do it.Although that way may not be obvious at first unless you're Dutch.Now is better than never.Although never is often better than *right* now.If the implementation is hard to explain, it's a bad idea.If the implementation is easy to explain, it may be a good idea.Namespaces are one honking great idea -- let's do more of those!in the face of what ?————————————————————————————————————————————————————————————
最后一行是得到的字符串,前面的是import this 模块带来的,这是一首诗,
in the face of what ?在诗中低12行,
In the face of ambiguity, refuse the temptation to guess.
答案为:<pre name="code" class="python">ambiguity
下一关:http://www.pythonchallenge.com/pc/hex/ambiguity.html
0 0
- python挑战之level 23
- python挑战之level 10
- python挑战之level 11
- python挑战之level 12
- python挑战之level 13
- python挑战之level 14
- python挑战之level 15
- python挑战之level 16
- python挑战之level 17
- python挑战之level 18
- python挑战之level 19
- python挑战之level 22
- python挑战之level 24
- python挑战之level 25
- python挑战之level 26
- python挑战之level 27
- python挑战之level 28
- python挑战之level 29
- python 将文字转为图片Logo
- 表类型(存储引擎)的选择
- Java中Calendar类的简单使用方法,以及日期格式化的方法,字符串日期格式的验证
- 虚拟机配置密匙
- PsychoPy入门_06_数据记录
- python挑战之level 23
- hxy系列2-图像分类与KNN
- Adobe 官方公布的 RTMP 规范
- 搭建 AngularJS+Ionic+Cordova 开发环境并运行一个demo
- 论文笔记《Fully Convolutional Networks for Semantic Segmentation》
- SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is a
- hibernate 更新 具体操作示例
- 【UML】— 实现图
- linux wget 命令用法详解(附实例说明)