{"id":2027,"date":"2026-06-22T09:10:01","date_gmt":"2026-06-22T01:10:01","guid":{"rendered":"https:\/\/wp.kcra.org.hk\/?p=2027"},"modified":"2026-06-22T09:10:01","modified_gmt":"2026-06-22T01:10:01","slug":"python-%e9%9a%b1%e8%97%8f%e7%9a%84%e7%a8%8b%e5%bc%8f%e7%a2%bc%e5%93%b2%e5%ad%b8%ef%bc%9a%e8%bc%b8%e5%85%a5-import-this-%e8%a7%a3%e9%8e%96%e3%80%8cpython-%e4%b9%8b%e7%a6%aa%e3%80%8d","status":"publish","type":"post","link":"https:\/\/wp.kcra.org.hk\/?p=2027","title":{"rendered":"Python: \u96b1\u85cf\u7684\u7a0b\u5f0f\u78bc\u54f2\u5b78\uff1a\u8f38\u5165 import this \u89e3\u9396\u300cPython \u4e4b\u79aa\u300d"},"content":{"rendered":"\n<p><strong>\u904b\u4f5c\u539f\u7406<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u6253\u958b\u4efb\u4f55\u4e00\u500b Python \u7684\u57f7\u884c\u74b0\u5883\uff08REPL \u7d42\u7aef\u6a5f\u6216 Jupyter Notebook\uff09\uff0c\u8f38\u5165 import this \u4e26\u6309\u4e0b Enter\uff0c\u87a2\u5e55\u4e0a\u5c31\u6703\u5370\u51fa\u4e00\u9996\u540d\u70ba<strong>\u300a<\/strong><strong>Python <\/strong><strong>\u4e4b\u79aa\u300b\uff08The Zen of Python<\/strong><strong>\uff09<\/strong>\u7684\u54f2\u5b78\u8a69\u3002<\/p>\n\n\n\n<p><strong>\u80cc\u5f8c\u6545\u4e8b<\/strong><\/p>\n<p>\u9019\u9996\u8a69\u4e26\u975e\u5409\u591a\u672c\u4eba\u6240\u5beb\uff0c\u800c\u662f\u7531 Python \u793e\u7fa4\u7684\u6838\u5fc3\u8ca2\u737b\u8005<strong>\u8482\u59c6<\/strong><strong>\u00b7<\/strong><strong>\u5f7c\u5f97\u65af\uff08Tim Peters<\/strong><strong>\uff09<\/strong>\u5728 1999 \u5e74\u64b0\u5beb\u7684\u3002\u4ed6\u5c07\u5409\u591a\u5c0d\u8a9e\u8a00\u8a2d\u8a08\u7684\u6839\u672c\u7406\u5ff5\uff0c\u6fc3\u7e2e\u6210 19 \u689d\u6307\u5c0e\u539f\u5247\u3002\u9019\u4e0d\u50c5\u50c5\u662f\u597d\u73a9\uff0c\u5b83\u66f4\u662f Python \u5b98\u65b9\u793e\u7fa4\u5728\u5be9\u67e5\u65b0\u529f\u80fd\uff08PEP \u63d0\u6848\uff09\u6642\u7684\u6700\u9ad8\u6307\u5c0e\u6280\u8853\u6e96\u5247\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"844\" height=\"162\" src=\"http:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step1.png\" alt=\"\" class=\"wp-image-2028\" srcset=\"https:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step1.png 844w, https:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step1-800x154.png 800w\" sizes=\"auto, (max-width: 844px) 100vw, 844px\" \/><figcaption class=\"wp-element-caption\">(\u8cc7\u6599\u4f86\u6e90: Wikipedia. s.v. &#8220;Zen of Python.&#8221; 2026\u5e746\u670818\u65e5\u6aa2\u7d22. https:\/\/en.wikipedia.org\/wiki\/Zen_of_Python.)<\/figcaption><\/figure>\n<\/div>\n\n\n<p><strong>\u6838\u5fc3\u91d1\u53e5\u89e3\u6790<\/strong><\/p>\n<ul>\n<li><strong>&#8220;Beautiful is better than ugly.&#8221;<\/strong><strong>\uff08\u512a\u7f8e\u52dd\u65bc\u919c\u964b\uff09<\/strong>\uff1a\u7a0b\u5f0f\u78bc\u4e0d\u50c5\u8981\u80fd\u8dd1\uff0c\u6392\u7248\u8207\u908f\u8f2f\u9084\u8981\u50cf\u85dd\u8853\u54c1\u4e00\u6a23\u597d\u770b\u3002<\/li>\n<li><strong>&#8220;Explicit is better than implicit.&#8221;<\/strong><strong>\uff08\u660e\u77ad\u52dd\u65bc\u6666\u6697\uff09<\/strong>\uff1a\u7a0b\u5f0f\u78bc\u8981\u505a\u4ec0\u9ebc\u61c9\u8a72\u6e05\u6e05\u695a\u695a\u5beb\u51fa\u4f86\uff0c\u4e0d\u8981\u641e\u96b1\u6666\u7684\u9b54\u6cd5\u6216\u8b93\u7cfb\u7d71\u5728\u80cc\u5f8c\u5077\u5077\u731c\u6e2c\u3002<\/li>\n<li><strong>&#8220;There should be one&#8211; and preferably only one &#8211;obvious way to do it.&#8221;<\/strong><strong>\uff08\u505a\u4e00\u4ef6\u4e8b\u61c9\u8a72\u53ea\u6709\u4e00\u7a2e\uff0c\u800c\u4e14\u6700\u597d\u53ea\u6709\u4e00\u7a2e\u660e\u986f\u7684\u65b9\u6cd5\uff09<\/strong>\uff1a\u9019\u8207 Perl \u8a9e\u8a00\u300c\u689d\u689d\u5927\u8def\u901a\u7f85\u99ac\uff08TMTOWTDI\uff09\u300d\u7684\u54f2\u5b78\u5b8c\u5168\u76f8\u53cd\u3002Python \u8ffd\u6c42\u8b93\u4e0d\u540c\u5de5\u7a0b\u5e2b\u5beb\u540c\u4e00\u500b\u529f\u80fd\u6642\uff0c\u5beb\u51fa\u4f86\u7684\u4ee3\u78bc\u9ad8\u5ea6\u76f8\u4f3c\uff0c\u9032\u800c\u964d\u4f4e\u5718\u968a\u5408\u4f5c\u7684\u95b1\u8b80\u6210\u672c\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"652\" src=\"https:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step2.png\" alt=\"\" class=\"wp-image-2029\" srcset=\"https:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step2.png 814w, https:\/\/wp.kcra.org.hk\/wp-content\/uploads\/2026\/06\/Zen_Of_Python-step2-749x600.png 749w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><figcaption class=\"wp-element-caption\">(\u8cc7\u6599\u4f86\u6e90: Wikipedia. s.v. &#8220;Zen of Python.&#8221; 2026\u5e746\u670818\u65e5\u6aa2\u7d22. https:\/\/en.wikipedia.org\/wiki\/Zen_of_Python.)<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u6709\u8da3\u7684\u662f\uff0c\u9019\u6bb5\u300aPython \u4e4b\u79aa\u300b\u5728\u6e90\u78bc\u88e1\u5176\u5be6\u662f\u7528\u4e00\u7a2e\u7c21\u55ae\u7684<strong> ROT13<\/strong><strong>\uff08\u5b57\u6bcd\u4f4d\u79fb 13 <\/strong><strong>\u4f4d\uff09\u52a0\u5bc6\u6cd5<\/strong>\u5132\u5b58\u7684\uff0c\u7576\u4f60\u57f7\u884c import this \u6642\uff0c\u5b83\u624d\u6703\u5728\u8a18\u61b6\u9ad4\u4e2d\u89e3\u5bc6\u4e26\u986f\u793a\u51fa\u4f86\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u904b\u4f5c\u539f\u7406 \u5982\u679c\u4f60\u6253\u958b\u4efb\u4f55\u4e00\u500b Python \u7684\u57f7\u884c\u74b0\u5883\uff08REPL \u7d42\u7aef\u6a5f\u6216 Jupyter Notebook\uff09 &hellip; <a href=\"https:\/\/wp.kcra.org.hk\/?p=2027\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">Python: \u96b1\u85cf\u7684\u7a0b\u5f0f\u78bc\u54f2\u5b78\uff1a\u8f38\u5165 import this \u89e3\u9396\u300cPython \u4e4b\u79aa\u300d<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":50,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2027","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/posts\/2027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2027"}],"version-history":[{"count":1,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions"}],"predecessor-version":[{"id":2030,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions\/2030"}],"wp:attachment":[{"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.kcra.org.hk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}