{"id":3578,"date":"2022-03-16T17:40:53","date_gmt":"2022-03-16T09:40:53","guid":{"rendered":"https:\/\/egonlin.com\/?p=3578"},"modified":"2022-03-18T11:12:46","modified_gmt":"2022-03-18T03:12:46","slug":"%e7%ac%ac%e4%b8%80%e8%8a%82%ef%bc%9apython%e5%9f%ba%e6%9c%ac%e7%89%b9%e6%80%a7","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=3578","title":{"rendered":"\u7b2c\u4e00\u8282\uff1apython\u57fa\u672c\u7279\u6027"},"content":{"rendered":"<h1>\u4ec0\u4e48\u662fPython<\/h1>\n<p>Python\u662f\u4e00\u79cd\u9ad8\u7ea7\u3001\u591a\u76ee\u7684\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5728\u5f88\u591a\u9886\u57df\u548c\u6280\u672f\u5c42\u9762\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002<\/p>\n<pre><code class=\"language-python\">\u8fd9\u662fpython\u5b98\u65b9\u5bf9\u4e8epython\u8fd9\u95e8\u8bed\u8a00\u7684\u89e3\u91ca\n&quot;&quot;&quot;\nPython is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python\u2019s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.\n&quot;&quot;&quot;<\/code><\/pre>\n<h1>Python\u7684\u4e3b\u8981\u7279\u6027<\/h1>\n<h2>1\u3001\u5f00\u6e90<\/h2>\n<p>Python\u548c\u5927\u591a\u6570\u7684\u652f\u6491\u5e93\u548c\u5de5\u5177\u90fd\u662f\u5f00\u6e90\u7684\uff0c\u901a\u5e38\u53ef\u4ee5\u975e\u5e38\u7075\u6d3b\u7684\u4f7f\u7528\u800c\u4e14\u6709\u5f00\u653e\u7684\u534f\u8bae\u3002<\/p>\n<h2>2\u3001\u89e3\u91ca\u6027<\/h2>\n<p>\u4e5f\u53ef\u4ee5\u4f7f\u7528Cpython\u5b8c\u6210\u5c06\u89e3\u91ca\u6027\u8bed\u8a00\u8f6c\u5316\u4e3a\u5b9e\u65bd\u53ef\u6267\u884c\u7684Python\u4e8c\u8fdb\u5236\u4ee3\u7801\u7684\u5e94\u7528<\/p>\n<h2>3\u3001\u591a\u6846\u67b6<\/h2>\n<p>Python\u8bed\u8a00\u652f\u6301\u4e0d\u540c\u7684\u7f16\u7a0b\u4e0e\u5b9e\u73b0\u6846\u67b6\uff0c\u4f8b\u5982\u9762\u5411\u5bf9\u8c61\u3001\u548c\u5fc5\u8981\u7684\u51fd\u6570\u578b\u6216\u8fc7\u7a0b\u5316\u7f16\u7a0b\u3002<\/p>\n<h2>4\u3001\u591a\u76ee\u7684<\/h2>\n<p>Python\u53ef\u4ee5\u7528\u4e8e\u5feb\u901f\u7684\u3001\u4ea4\u4e92\u5f0f\u7684\u4ee3\u7801\u5f00\u53d1\u4ee5\u53ca\u5efa\u6784\u5927\u578b\u5e94\u7528\u7cfb\u7edf\uff0c\u5b83\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5e95\u5c42\u7cfb\u7edf\u64cd\u4f5c\u4ee5\u53ca\u9ad8\u7ea7\u5206\u6790\u7684\u4efb\u52a1<\/p>\n<h1>Python\u7684\u7b80\u5355\u5386\u53f2<\/h1>\n<p>\u200b   python\u76ee\u524d\u5bf9\u4e8e\u5927\u591a\u6570\u4eba\u6765\u8bf4\u90fd\u5e94\u8be5\u4e0d\u662f\u4e00\u95e8\u964c\u751f\u7684\u8bed\u8a00\u4e86\uff0c\u4f46\u662f\u4ed6\u771f\u6b63\u5728\u56fd\u5185\u6d41\u884c\u5e76\u5e7f\u6cdb\u4f7f\u7528\u53ea\u662f\u5728\u524d\u51e0\u5e74\u800c\u5df2\uff0c\u4f46\u662f\u5176\u5b9e\u5b83\u7684\u5386\u53f2\u6bd4Java\u8fd8\u8981\u60a0\u4e45\u3002\u5bf9Python\u7684\u5f00\u53d1\u81ea1980\u5e74\u4ee3\u5c31\u5df2\u7ecf\u5f00\u59cb\uff0c\u6b63\u5f0f\u63a8\u5e7f\u662f\u57281991\u5e74\u7684\u65f6\u5019\uff0c\u521b\u59cb\u4eba\u662f\u8377\u5170\u7684Guido van Rossum\u3002\u800c\u5728\u8fd9\u4e2a\u65f6\u5019\u8ddd\u79bbJava\u51fa\u751f\u8fd8\u67094\u5e74\u7684\u65f6\u95f4\u3002<\/p>\n<p>\u200b   \u9700\u8981\u6ce8\u610f\u7684\u4e00\u70b9\uff0c\u8fd9\u4e00\u70b9\u4e5f\u901a\u5e38\u4f7f\u521a\u521a\u63a5\u89e6Python\u8bed\u8a00\u7684\u4eba\u611f\u5230\u8ff7\u60d1\uff0c\u5c31\u662f\u76ee\u524d\u6709\u4e24\u79cd\u53ef\u884c\u7684Python\u7248\u672c\uff0c\u90fd\u5728\u5f00\u53d1\uff0c\u800c\u4e14\u81ea2008\u5e74\u4ee5\u6765\u88ab\u5e73\u884c\u4f7f\u7528\u3002\u76ee\u524d\uff0c\u4e24\u4e2a\u7248\u672c\u4e4b\u95f4\u5e76\u6ca1\u6709100%\u7684\u517c\u5bb9\uff0c\u800c\u4e14\u76ee\u524dPython 2\u7248\u672c\u5df2\u7ecf\u88ab\u544a\u77e5\u5c06\u8981\u57282020\u5e74\u76841\u6708\u4efd\u6b63\u5f0f\u505c\u6b62\u7ef4\u62a4\uff0c\u6240\u4ee5\u672a\u6765\u4e3b\u6d41\u4f7f\u7528\u7684python\u7248\u672c\u8fd8\u662fpython3.\u56e0\u6b64\u672c\u8bfe\u7a0b\u4e3b\u8981\u4f7f\u7528\u7684\u662fpython3\u7248\u672c\uff0c\u867d\u7136\u5927\u591a\u6570\u7684\u4f8b\u5b50\u4ee3\u7801\u5728python2\u4e2d\u4e5f\u662f\u53ef\u4ee5\u8fd0\u884c\u7684\u3002<\/p>\n<h1>Python\u751f\u6001\u7cfb\u7edf<\/h1>\n<p>\u672c\u8bfe\u7a0b\u4e2d\u5c55\u793a\u7684\u4f8b\u5b50\u90fd\u662f\u4f7f\u7528Ipython\u8fd9\u79cd\u6d41\u884c\u7684Python\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002<\/p>\n<p>IPython\u662fpython\u7684\u4e00\u4e2a\u4ea4\u4e92\u5f0fshell\uff0c\u5b83\u6bd4\u9ed8\u8ba4\u7684\u201cpython shell\u201d\u66f4\u65b9\u4fbf\uff0c\u652f\u6301\u53d8\u91cf\u81ea\u52a8\u8865\u5168\uff0c\u81ea\u52a8\u7f29\u8fdb\uff0c\u652f\u6301 bash shell \u547d\u4ee4\uff0c\u5185\u7f6e\u4e86\u8bb8\u591a\u5f3a\u5927\u7684\u529f\u80fd\u548c\u51fd\u6570\u3002IPython \u662f\u57fa\u4e8eBSD \u5f00\u6e90\u7684\uff0c\u5e76\u4e14IPython\u4e3a\u4ea4\u4e92\u5f0f\u8ba1\u7b97\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4e30\u5bcc\u7684\u67b6\u6784<\/p>\n<p>Ipython\u63d0\u4f9b\u4e86\u591a\u79cd\u7248\u672c\uff1a<\/p>\n<p>\u547d\u4ee4\u884c\u7248\u672c\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2022\/03\/jupyter.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2022\/03\/jupyter.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<p>\u57fa\u4e8e\u6d4f\u89c8\u5668\u7684\u7248\u672c\uff08Notebook\uff09<\/p>\n<h1>Python\u7684\u7528\u6237\u7fa4\u4f53<\/h1>\n<p>Python\u4e0d\u4ec5\u4f1a\u5438\u5f15\u4e13\u4e1a\u7684\u8f6f\u4ef6\u5f00\u53d1\u4eba\u5458\uff0c\u800c\u4e14\u53ef\u4ee5\u4e3a\u4e1a\u52a1\u5f00\u53d1\u8005\uff0c\u9886\u57df\u4e13\u5bb6\u548c\u79d1\u5b66\u8ba1\u7b97\u5f00\u53d1\u8005\u6240\u4f7f\u7528\u3002<\/p>\n<blockquote>\n<p>\u4e13\u4e1a\u7684\u8f6f\u4ef6\u5f00\u53d1\u8005<\/p>\n<\/blockquote>\n<p>Python\u652f\u6301\u6240\u6709\u7684\u7f16\u7a0b\u6846\u67b6\uff0c\u6709\u5927\u91cf\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u4e13\u4e1a\u7684\u8f6f\u4ef6\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u6765\u6784\u5efa\u81ea\u5b9a\u4e49\u7684\u6846\u67b6\u548c\u7c7b\uff0c\u4e0e\u57fa\u7840\u7684Python\u5e93\u548c\u79d1\u5b66\u8ba1\u7b97\u5e93\u4e00\u8d77\uff0c\u5b9e\u73b0\u751f\u6001\u7cfb\u7edf\u7684\u6700\u5927\u5316\u5e94\u7528\u3002<\/p>\n<blockquote>\n<p>\u79d1\u5b66\u5f00\u53d1\u8005\u548c\u9886\u57df\u4e13\u5bb6\uff1a<\/p>\n<\/blockquote>\n<p>\u8fd9\u4e9b\u7528\u6237\u4f1a\u5927\u91cf\u7684\u4f7f\u7528\u67d0\u4e9b\u5e93\u548c\u6846\u67b6\u7684\u6846\u67b6\uff0c\u6765\u521b\u5efa\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u5e76\u4e14\u968f\u7740\u65f6\u95f4\u8fdb\u884c\u63d0\u5347\u548c\u4f18\u5316\uff0c\u4f7f\u5f97\u6574\u4e2a\u751f\u6001\u7cfb\u7edf\u6ee1\u8db3\u4ed6\u4eec\u7684\u5177\u4f53\u9700\u6c42\u3002\u8fd9\u7c7b\u7528\u6237\u901a\u5e38\u4f1a\u81f4\u529b\u4e8e\u8f83\u957f\u65f6\u95f4\u7684\u4ea4\u4e92\u64cd\u4f5c\uff0c\u5feb\u901f\u7684\u5f62\u6210\u65b0\u4ee3\u7801\u7684\u539f\u578b\uff0c\u5e76\u4e14\u5bf9\u7814\u7a76\u4ee5\u53ca\u9886\u57df\u6570\u636e\u96c6\u8fdb\u884c\u63a2\u8ba8\u548c\u53ef\u89c6\u5316\u3002<\/p>\n<blockquote>\n<p>\u6bd4\u8f83\u968f\u610f\u7684\u7f16\u7a0b\u4eba\u5458<\/p>\n<\/blockquote>\n<p>\u4f7f\u7528Python\u6765\u5904\u7406\u4ed6\u4eec\u8ba4\u4e3a\u6709\u4f18\u52bf\u7684\u5177\u4f53\u95ee\u9898\u3002\u4f8b\u5982\u53ef\u4ee5\u5c06\u4e00\u4e9bmatplotlib\u7684\u5177\u4f53\u4ee3\u7801\u8fdb\u884c\u590d\u5236\uff0c\u7a0d\u52a0\u4fee\u6539\u6765\u6ee1\u8db3\u7279\u5b9a\u7684\u4e1a\u52a1\u9700\u8981\u3002<\/p>\n<blockquote>\n<p>\u7f16\u7a0b\u7684\u521d\u5b66\u8005<\/p>\n<\/blockquote>\n<p>\u4e5f\u4f1a\u4f7f\u7528Python\u4f5c\u4e3a\u6559\u5b66\u8bed\u8a00\uff0c\u8fd9\u662f\u56e0\u4e3a\u5b83\u7684\u57fa\u7840\u8bed\u6cd5\u662f\u6bd4\u8f83\u5bb9\u6613\u5b66\u4e60\u548c\u7406\u89e3\u7684\uff0c\u89e3\u91ca\u5bf9\u975e\u7f16\u7a0b\u4eba\u5458\u6765\u8bf4\u4e5f\u662f\u8fd9\u6837\uff0c\u800c\u4e14Python\u8fd8\u652f\u6301\u51e0\u4e4e\u6240\u6709\u7684\u7f16\u7a0b\u6a21\u5f0f\u3002\u800c\u4e14\u76ee\u524dpython\u8fd9\u95e8\u8bed\u8a00\u5df2\u7ecf\u88ab\u6d59\u6c5f\u7701\u7eb3\u5165\u9ad8\u8003\u5f53\u4e2d\uff0c\u4f17\u591a\u4e2d\u5c0f\u5b66\u751f\u7684\u6559\u6750\u5f53\u4e2d\u90fd\u4f1a\u6709python\u7684\u4ee3\u7801\u51fa\u73b0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fPython Python\u662f\u4e00\u79cd\u9ad8\u7ea7\u3001\u591a\u76ee\u7684\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5728\u5f88\u591a\u9886\u57df\u548c\u6280\u672f\u5c42\u9762\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002 \u8fd9\u662fpyt [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[311,310],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/3578"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3578"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/3578\/revisions"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}