首页IT科技禅道getshell(python之禅是什么)

禅道getshell(python之禅是什么)

时间2025-07-31 19:39:39分类IT科技浏览4711
导读:1、说明...

1               、说明

Python之禅指的是Tim Peters 编写的关于python编程准则               。

2                       、操作步骤

在python的交互界面输入import this               ,回车                     ,会发现返回了一些代码规范                       。

3      、代码

>>>importthis TheZenofPython,byTimPeters蟒宗之禅语        ,提姆彼得斯(中文是我加的            ,参考了几种网上的译文) Beautifulisbetterthanugly.优美胜于丑陋 Explicitisbetterthanimplicit.明白胜于晦暗 Simpleisbetterthancomplex.简洁胜于繁复 Complexisbetterthancomplicated.繁复胜于艰深 Flatisbetterthannested.扁平胜于嵌套 Sparseisbetterthandense.松散胜于聚集 Readabilitycounts.代码确保易读 Specialcasesarentspecialenoughtobreaktherules.规则拒绝特例 Althoughpracticalitybeatspurity.实用不求纯净 Errorsshouldneverpasssilently.错误不可放过 Unlessexplicitlysilenced.除非明确理由 Inthefaceofambiguity,refusethetemptationtoguess. 模棱两可之间                     ,不要随意猜测 Thereshouldbeone--andpreferablyonlyone--obviouswaytodoit.必有唯一选择            ,明显胜过其余 AlthoughthatwaymaynotbeobviousatfirstunlessyoureDutch.起初无法分辨        ,只因你非大神 Nowisbetterthannever.尝试好过放弃 Althoughneverisoftenbetterthan*right*now.但须谋定而动 Iftheimplementationishardtoexplain,itsabadidea.实现难以解释                     ,定是糟糕方案 Iftheimplementationiseasytoexplain,itmaybeagoodidea.实现易于解释                ,或为良好方案 Namespacesareonehonkinggreatidea--letsdomoreofthose!名称空间极好    ,诸君多加使用!

以上就是python之禅的介绍                     ,希望对想要学习python的人有所帮助      。更多Python学习指路:Python基础教程

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
python函数值传递(python函数传递参数的两种方式) tcl终端(tset命令 – 终端初始化)