{"id":110,"date":"2013-03-25T19:53:22","date_gmt":"2013-03-25T11:53:22","guid":{"rendered":"http:\/\/blog.dayandcarrot.net\/?p=110"},"modified":"2013-03-25T19:53:22","modified_gmt":"2013-03-25T11:53:22","slug":"python%e5%85%a5%e9%97%a8%e8%ae%b2%e4%b9%89","status":"publish","type":"post","link":"https:\/\/dayandcarrot.space\/?p=110","title":{"rendered":"Python\u5165\u95e8\u8bb2\u4e49"},"content":{"rendered":"<p align=\"center\"><b>Python<\/b><b>\u5165\u95e8<\/b><\/p>\n<p align=\"center\">\n<p align=\"right\">By nincompoop<\/p>\n<div>\n<blockquote><p><strong>\u56fe\u6587PDF\u4e0b\u8f7d\uff1a<\/strong><br \/>\n<strong><a href=\"http:\/\/orz.dayandcarrot.net\/wordpress\/wp-content\/uploads\/2013\/03\/Python\u8bb2\u4e49.pdf\">Python\u8bb2\u4e49<\/a><\/strong><\/p><\/blockquote>\n<p>\u53c2\u8003\u6559\u7a0b\uff1a<br \/>\n<a href=\"http:\/\/www.cnblogs.com\/known\/archive\/2010\/07\/31\/1789249.html\">http:\/\/www.cnblogs.com\/known\/archive\/2010\/07\/31\/1789249.html<\/a><br \/>\n&nbsp;\n<\/div>\n<p><strong>\u5b98\u65b9\u4ecb\u7ecd\uff1a<\/strong>Python\u662f\u4e00\u79cd\u7b80\u5355\u6613\u5b66\uff0c\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b83\u6709\u9ad8\u6548\u7387\u7684\u9ad8\u5c42\u6570\u636e\u7ed3\u6784\uff0c\u7b80\u5355\u800c\u6709\u6548\u5730\u5b9e\u73b0\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u3002Python\u7b80\u6d01\u7684\u8bed\u6cd5\u548c\u5bf9\u52a8\u6001\u8f93\u5165\u7684\u652f\u6301\uff0c\u518d\u52a0\u4e0a\u89e3\u91ca\u6027\u8bed\u8a00\u7684\u672c\u8d28\uff0c\u4f7f\u5f97\u5b83\u5728\u5927\u591a\u6570\u5e73\u53f0\u4e0a\u7684\u8bb8\u591a\u9886\u57df\u90fd\u662f\u4e00\u4e2a\u7406\u60f3\u7684\u811a\u672c\u8bed\u8a00\uff0c\u7279\u522b\u9002\u7528\u4e8e\u5feb\u901f\u7684\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u3002<br \/>\n<strong>\u521b\u9020\u8005\uff1a<\/strong>Guido van Rossum\uff08\u5409\u591a\u00b7\u8303\u7f57\u82cf\u59c6\u3010\u8377\u5170\u3011\uff09<br \/>\n<strong>\u5b83\u7684\u7279\u8272\uff1a<\/strong>\u7b80\u5355\u3001\u6613\u5b66\u3001\u514d\u8d39\u3001\u5f00\u6e90\u3001\u9ad8\u5c42\u8bed\u8a00\u3001\u53ef\u79fb\u690d\u6027\u3001\u89e3\u91ca\u6027\u3001\u9762\u5411\u5bf9\u8c61\u3001\u53ef\u6269\u5c55\u6027\u3001\u53ef\u5d4c\u5165\u6027\u3001\u4e30\u5bcc\u7684\u5e93\u3002<br \/>\n<b>\u5b98\u7f51\uff1a<\/b><a href=\"http:\/\/python.org\/\">http:\/\/python.org\/<\/a><br \/>\nPython\u652f\u6301\u547d\u4ee4\u5f0f\u7a0b\u5e8f\u8bbe\u8ba1\u3001\u9762\u5411\u5bf9\u8c61\u7a0b\u5e8f\u8bbe\u8ba1\u3001\u51fd\u6570\u5f0f\u7f16\u7a0b\u3001\u9762\u5411\u5207\u9762\u7f16\u7a0b\u3001\u6cdb\u578b\u7f16\u7a0b\u591a\u79cd\u7f16\u7a0b\u8303\u5f0f\u3002\u4e0eScheme\u3001Ruby\u3001Perl\u3001Tcl\u7b49\u52a8\u6001\u8bed\u8a00\u4e00\u6837\uff0cPython\u5177\u5907\u5783\u573e\u56de\u6536\u529f\u80fd\uff0c\u80fd\u591f\u81ea\u52a8\u7ba1\u7406\u5b58\u50a8\u5668\u4f7f\u7528\u3002\u5b83\u7ecf\u5e38\u88ab\u5f53\u4f5c\u811a\u672c\u8bed\u8a00\u7528\u4e8e\u5904\u7406\u7cfb\u7edf\u7ba1\u7406\u4efb\u52a1\u548c\u7f51\u7edc\u7a0b\u5e8f\u7f16\u5199\uff0c\u7136\u800c\u5b83\u4e5f\u975e\u5e38\u9002\u5408\u5b8c\u6210\u5404\u79cd\u9ad8\u7ea7\u4efb\u52a1\u3002Python\u865a\u62df\u673a\u672c\u8eab\u51e0\u4e4e\u53ef\u4ee5\u5728\u6240\u6709\u7684\u4f5c\u4e1a\u7cfb\u7edf\u4e2d\u8fd0\u884c\u3002<\/p>\n<div>\n<b>\u7248\u672c\uff1a<\/b>3.x\u4e0e2.x \uff08Python 3.0\u4e8e2008\u5e7412\u67083\u65e5\u53d1\u5e03\uff0c<b>\u6b64\u7248\u4e0d\u5b8c\u5168\u517c\u5bb9\u4e4b\u524d\u7684<\/b><b>Python<\/b><b>\u6e90\u4ee3\u7801<\/b>\u3002\u4e0d\u8fc7\uff0c\u5f88\u591a\u65b0\u7279\u6027\u540e\u6765\u4e5f\u88ab\u79fb\u690d\u5230\u65e7\u7684Python 2.6\/2.7\u7248\u672c\u3002\uff09<br \/>\n&nbsp;\n<\/div>\n<div>\n<h2>Hello World \u7a0b\u5e8f<\/h2>\n<\/div>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5728\u6807\u51c6\u8f93\u8bbe\u5907\u4e0a\u8f93\u51fa<a title=\"Hello World\u7a0b\u5e8f\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Hello_World%E7%A8%8B%E5%BC%8F&amp;action=edit&amp;redlink=1\">Hello World<\/a>\u7684\u7b80\u5355\u7a0b\u5e8f\uff0c\u8fd9\u79cd\u7a0b\u5e8f\u901a\u5e38\u4f5c\u4e3a\u5f00\u59cb\u5b66\u4e60\u7f16\u7a0b\u8bed\u8a00\u65f6\u7684\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\uff1a<\/p>\n<ul>\n<li><b>\u9002\u7528\u4e8e<\/b><b>Python 3.0<\/b><b>\u4ee5\u4e0a\u7248\u672c\u4ee5\u53ca<\/b><b>Python 2.6<\/b><b>\u3001<\/b><b>Python 2.7<\/b><\/li>\n<li><b>\u9002\u7528\u4e8e<\/b><b>Python 2.6<\/b><b>\u4ee5\u4e0b\u7248\u672c\u4ee5\u53ca<\/b><b>Python 2.6<\/b><b>\u3001<\/b><b>Python 2.7<\/b><\/li>\n<\/ul>\n<pre><b>print<\/b>(\"Hello, world!\")<\/pre>\n<pre>\n<b>print<\/b> \"Hello, world!\"<\/pre>\n<p>\u5c06\u8fd9\u884c\u7a0b\u5e8f\u7801\u4fdd\u5b58\u4e3amyhello.py\u3002\u7136\u540e\u5728Linux\u7ec8\u7aef\u673a\u4e0b\u8f93\u5165<code>python myhello.py<\/code>\uff0c\u6216\u8005\u5728Windows\u547d\u4ee4\u7f16\u8f91\u5b57\u7b26\u4e0b\u8f93\u5165<code>myhello.py<\/code>\u8fd0\u884c\u3002Python\u4e5f\u53ef\u4ee5\u5355\u6b65\u76f4\u8bd1\u8fd0\u884c\u3002\u8fd0\u884cPython\u89e3\u91ca\u5668\u8fdb\u5165\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u7684\u73af\u5883\uff0c\u4f60\u53ef\u4ee5\u5728\u63d0\u793a\u7b26\u53f7&gt;&gt;&gt;\u65c1\u8f93\u5165print(&#8220;Hello, world!&#8221;)\uff0c\u6309Enter\u952e\u8f93\u51fa\u7ed3\u679c\uff1a<\/p>\n<ul>\n<li><b>\u9002\u7528\u4e8e<\/b><b>Python 3.0<\/b><b>\u4ee5\u4e0a\u7248\u672c\u4ee5\u53ca<\/b><b>Python 2.6<\/b><b>\u3001<\/b><b>Python 2.7<\/b><\/li>\n<li><b>\u9002\u7528\u4e8e<\/b><b>Python 2.6<\/b><b>\u4ee5\u4e0b\u7248\u672c\u4ee5\u53ca<\/b><b>Python 2.6<\/b><b>\u3001<\/b><b>Python 2.7<\/b><\/li>\n<\/ul>\n<pre>&gt;&gt;&gt; <b>print<\/b>(\"Hello, world!\")<\/pre>\n<pre>Hello, world!<\/pre>\n<pre>&gt;&gt;&gt; <b>print<\/b> \"Hello, world!\"<\/pre>\n<pre>Hello, world!<\/pre>\n<div>\n\u6ce8\u610f\uff0c\u4f4e\u4e8e3.0\u7248\u672c\u7684Python\uff0c&#8221;Hello, world!&#8221;\u5468\u56f4\u4e0d\u9700\u8981\u62ec\u53f7\u3002Python 3.x\u4e0ePython 2.x\u7684print\u8bed\u6cd5\u662f\u4e0d\u4e00\u6837\u7684\u3002\n<\/div>\n<div>\n<h2>Python\u8bed\u6cd5<\/h2>\n<\/div>\n<div>\nPython\u7684\u8bbe\u8ba1\u76ee\u6807\u4e4b\u4e00\u662f\u8ba9\u4ee3\u7801\u5177\u5907\u9ad8\u5ea6\u7684\u53ef\u9605\u8bfb\u6027\u3002\u5b83\u8bbe\u8ba1\u65f6\u5c3d\u91cf\u4f7f\u7528\u5176\u5b83\u8bed\u8a00\u7ecf\u5e38\u4f7f\u7528\u7684\u6807\u70b9\u7b26\u53f7\u548c\u82f1\u6587\u5355\u5b57\uff0c\u8ba9\u4ee3\u7801\u770b\u8d77\u6765\u6574\u6d01\u7f8e\u89c2\u3002\u5b83\u4e0d\u50cf\u5176\u4ed6\u7684\u9759\u6001\u8bed\u8a00\u5982C\u3001Pascal\u90a3\u6837\u9700\u8981\u91cd\u590d\u4e66\u5199\u58f0\u660e\u8bed\u53e5\uff0c\u4e5f\u4e0d\u50cf\u5b83\u4eec\u7684\u8bed\u6cd5\u90a3\u6837\u7ecf\u5e38\u6709\u7279\u6b8a\u60c5\u51b5\u548c\u60ca\u559c\u3002\n<\/div>\n<h3>\u7f29\u8fdb\uff08\u544a\u522b{}\uff01\uff09<\/h3>\n<p>Python\u5f00\u53d1\u8005\u6709\u610f\u8ba9\u8fdd\u53cd\u4e86\u7f29\u8fdb\u89c4\u5219\u7684\u7a0b\u5e8f\u4e0d\u80fd\u901a\u8fc7\u7f16\u8bd1\uff0c\u4ee5\u6b64\u6765\u5f3a\u5236\u7a0b\u5e8f\u5458\u517b\u6210\u826f\u597d\u7684\u7f16\u7a0b\u4e60\u60ef\u3002\u5e76\u4e14Python\u8bed\u8a00\u5229\u7528\u7f29\u8fdb\u8868\u793a\u8bed\u53e5\u5757\u7684\u5f00\u59cb\u548c\u9000\u51fa\uff08<a title=\"Off-side\u89c4\u5219\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Off-side%E8%A6%8F%E5%89%87\">Off-side\u89c4\u5219<\/a>\uff09\uff0c\u800c\u975e\u4f7f\u7528\u82b1\u62ec\u53f7\u6216\u8005\u67d0\u79cd\u5173\u952e\u5b57\u3002\u589e\u52a0\u7f29\u8fdb\u8868\u793a\u8bed\u53e5\u5757\u7684\u5f00\u59cb\uff0c\u800c\u51cf\u5c11\u7f29\u8fdb\u5219\u8868\u793a\u8bed\u53e5\u5757\u7684\u9000\u51fa\u3002\u7f29\u8fdb\u6210\u4e3a\u4e86\u8bed\u6cd5\u7684\u4e00\u90e8\u5206\u3002\u4f8b\u5982<code>if<\/code>\u8bed\u53e5\uff1a<br \/>\n&nbsp;<br \/>\n\u6839\u636ePEP\u7684\u89c4\u5b9a\uff0c\u5fc5\u987b\u4f7f\u7528<b>4<\/b><b>\u4e2a\u7a7a\u683c<\/b>\u6765\u8868\u793a\u6bcf\u7ea7\u7f29\u8fdb\u3002<i><span style=\"text-decoration: underline;\">\u4f7f\u7528<\/span><\/i><i><span style=\"text-decoration: underline;\">Tab<\/span><\/i><i><span style=\"text-decoration: underline;\">\u5b57\u7b26\u548c\u5176\u5b83\u6570\u76ee\u7684\u7a7a\u683c\u867d\u7136\u90fd\u53ef\u4ee5\u7f16\u8bd1\u901a\u8fc7\uff0c\u4f46\u4e0d\u7b26\u5408\u7f16\u7801\u89c4\u8303<\/span><\/i><span style=\"text-decoration: underline;\">\u3002<\/span>\u652f\u6301Tab\u5b57\u7b26\u548c\u5176\u5b83\u6570\u76ee\u7684\u7a7a\u683c\u4ec5\u4ec5\u662f\u4e3a\u517c\u5bb9\u5f88\u65e7\u7684\u7684Python\u7a0b\u5e8f\u548c\u67d0\u4e9b\u6709\u95ee\u9898\u7684\u7f16\u8f91\u7a0b\u5e8f\u3002<\/p>\n<h3>\u8bed\u53e5\u548c\u63a7\u5236\u6d41<\/h3>\n<ul>\n<li><code>if<\/code>\u8bed\u53e5\uff0c\u5f53\u6761\u4ef6\u6210\u7acb\u65f6\u8fd0\u884c\u8bed\u53e5\u5757\u3002\u7ecf\u5e38\u4e0e<code>else<\/code>,\u00a0<code>elif<\/code>(\u76f8\u5f53\u4e8e<code>else if<\/code>) \u914d\u5408\u4f7f\u7528\u3002<\/li>\n<li><code>for<\/code>\u8bed\u53e5\uff0c\u904d\u5217\u5217\u8868\u3001\u5b57\u7b26\u4e32\u3001\u5b57\u5178\u3001\u96c6\u5408\u7b49<a title=\"\u8fed\u4ee3\u5668\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E8%BF%AD%E4%BB%A3%E5%99%A8\">\u8fed\u4ee3\u5668<\/a>\uff0c\u4f9d\u6b21\u5904\u7406\u8fed\u4ee3\u5668\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u3002<\/li>\n<li><code>while<\/code>\u8bed\u53e5\uff0c\u5f53\u6761\u4ef6\u4e3a\u771f\u65f6\uff0c\u5faa\u73af\u8fd0\u884c\u8bed\u53e5\u5757\u3002<\/li>\n<li><code>try<\/code>\u8bed\u53e5\u3002\u4e0e<code>except<\/code>,<code>finally<\/code>\u914d\u5408\u4f7f\u7528\u5904\u7406\u5728\u7a0b\u5e8f\u8fd0\u884c\u4e2d\u51fa\u73b0\u7684\u5f02\u5e38\u60c5\u51b5\u3002<\/li>\n<li><code>class<\/code>\u8bed\u53e5\u3002\u7528\u4e8e\u5b9a\u4e49\u7c7b\u578b\u3002<\/li>\n<li><code>def<\/code>\u8bed\u53e5\u3002\u7528\u4e8e\u5b9a\u4e49\u51fd\u6570\u548c\u7c7b\u578b\u7684\u65b9\u6cd5\u3002<\/li>\n<li><code>pass<\/code>\u8bed\u53e5\u3002\u8868\u793a\u6b64\u884c\u4e3a\u7a7a\uff0c\u4e0d\u8fd0\u884c\u4efb\u4f55\u64cd\u4f5c\u3002<\/li>\n<li><code>assert<\/code>\u8bed\u53e5\u3002\u7528\u4e8e\u7a0b\u5e8f\u8c03\u9002\u9636\u6bb5\u65f6\u6d4b\u8bd5\u8fd0\u884c\u6761\u4ef6\u662f\u5426\u6ee1\u8db3\u3002<\/li>\n<li><code>with<\/code>\u8bed\u53e5\u3002Python2.6\u4ee5\u540e\u5b9a\u4e49\u7684\u8bed\u6cd5\uff0c\u5728\u4e00\u4e2a\u573a\u666f\u4e2d\u8fd0\u884c\u8bed\u53e5\u5757\u3002\u6bd4\u5982\uff0c\u8fd0\u884c\u8bed\u53e5\u5757\u524d\u52a0\u5bc6\uff0c\u7136\u540e\u5728\u8bed\u53e5\u5757\u8fd0\u884c\u9000\u51fa\u540e\u89e3\u5bc6\u3002<\/li>\n<li><code>yield<\/code>\u8bed\u53e5\u3002\u5728\u8fed\u4ee3\u5668\u51fd\u6570\u5185\u4f7f\u7528\uff0c\u7528\u4e8e\u8fd4\u56de\u4e00\u4e2a\u5143\u7d20\u3002\u81ea\u4ecePython 2.5\u7248\u672c\u4ee5\u540e\u3002\u8fd9\u4e2a\u8bed\u53e5\u53d8\u6210\u4e00\u4e2a\u8fd0\u7b97\u7b26\u3002<\/li>\n<li><code>raise<\/code>\u8bed\u53e5\u3002\u5236\u9020\u4e00\u4e2a\u9519\u8bef\u3002<\/li>\n<li><code>import<\/code>\u8bed\u53e5\u3002\u5bfc\u5165\u4e00\u4e2a\u6a21\u5757\u6216\u5305\u3002<\/li>\n<li><code>from import<\/code>\u8bed\u53e5\u3002\u4ece\u5305\u5bfc\u5165\u6a21\u5757\u6216\u4ece\u6a21\u5757\u5bfc\u5165\u67d0\u4e2a\u5bf9\u8c61\u3002<\/li>\n<li><code>import as<\/code>\u8bed\u53e5\u3002\u5c06\u5bfc\u5165\u7684\u5bf9\u8c61\u8d4b\u503c\u7ed9\u4e00\u4e2a\u53d8\u91cf\u3002<\/li>\n<li><code>in<\/code>\u8bed\u53e5\u3002\u5224\u65ad\u4e00\u4e2a\u5bf9\u8c61\u662f\u5426\u5728\u4e00\u4e2a\u5b57\u7b26\u4e32\/\u5217\u8868\/\u5143\u7ec4\u91cc\u3002<\/li>\n<\/ul>\n<div><\/div>\n<h3>\u8868\u8fbe\u5f0f<\/h3>\n<p>Python\u7684\u8868\u8fbe\u5f0f\u5199\u6cd5\u4e0eC\/C++\u7c7b\u4f3c\u3002\u53ea\u662f\u5728\u67d0\u4e9b\u5199\u6cd5\u6709\u6240\u5dee\u522b\u3002<\/p>\n<ul>\n<li>\u4e3b\u8981\u7684\u7b97\u672f\u8fd0\u7b97\u7b26<b>\u4e0e<\/b><b>C\/C++<\/b><b>\u7c7b\u4f3c<\/b>\u3002<code>+, -, *, \/, \/\/, **, ~,\u00a0%<\/code>\u5206\u522b\u8868\u793a\u52a0\u6cd5\u6216\u8005\u53d6\u6b63\u3001\u51cf\u6cd5\u6216\u8005\u53d6\u8d1f\u3001\u4e58\u6cd5\u3001\u9664\u6cd5\u3001\u6574\u9664\u3001\u4e58\u65b9\u3001\u53d6\u8865\u3001\u53d6\u6a21\u3002<code>&gt;&gt;, &lt;&lt;<\/code>\u8868\u793a\u53f3\u79fb\u548c\u5de6\u79fb\u3002<code>&amp;, |, ^<\/code>\u8868\u793a\u4e8c\u8fdb\u5236\u7684<code>AND, OR, XOR<\/code>\u8fd0\u7b97\u3002<code>&gt;, &lt;, ==,\u00a0!=, &lt;=, &gt;=<\/code>\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\uff0c\u5206\u522b\u8868\u793a\u5927\u4e8e\u3001\u5c0f\u4e8e\u3001\u7b49\u4e8e\u3001\u4e0d\u7b49\u4e8e\u3001\u5c0f\u4e8e\u7b49\u4e8e\u3001\u5927\u4e8e\u7b49\u4e8e\u3002\u5728\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u91cc\u9762\uff0c<code>~, |, ^, &amp;, &lt;&lt;, &gt;&gt;<\/code>\u5fc5\u987b\u5e94\u7528\u4e8e\u6574\u6570\u3002<\/li>\n<li>Python\u4f7f\u7528<code><b><span style=\"text-decoration: underline;\">and<\/span><\/b><\/code><b><span style=\"text-decoration: underline;\">,\u00a0<\/span><\/b><code><b><span style=\"text-decoration: underline;\">or<\/span><\/b><\/code><b><span style=\"text-decoration: underline;\">,\u00a0<\/span><\/b><code><b><span style=\"text-decoration: underline;\">not<\/span><\/b><\/code><b><span style=\"text-decoration: underline;\">\u8868\u793a\u903b\u8f91\u8fd0\u7b97<\/span><\/b>\u3002<\/li>\n<li><code><b><span style=\"text-decoration: underline;\">is, is not<\/span><\/b><\/code><b><span style=\"text-decoration: underline;\">\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u53d8\u91cf\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5bf9\u8c61\u3002<\/span><\/b><code><b><span style=\"text-decoration: underline;\">in, not in<\/span><\/b><\/code><b><span style=\"text-decoration: underline;\">\u7528\u4e8e\u5224\u65ad\u4e00\u4e2a\u5bf9\u8c61\u662f\u5426\u5c5e\u4e8e\u53e6\u5916\u4e00\u4e2a\u5bf9\u8c61\u3002<\/span><\/b><b><\/b><\/li>\n<li>Python\u652f\u6301\u201c\u5217\u8868\u63a8\u5bfc\u5f0f\u201d\uff08list comprehension\uff09\uff0c\u6bd4\u5982\u8ba1\u7b970-9\u7684\u5e73\u65b9\u548c:<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>Python\u4f7f\u7528lambda\u8868\u793a\u533f\u540d\u51fd\u6570\u3002\u533f\u540d\u51fd\u6570\u4f53\u53ea<b>\u80fd\u662f\u8868\u8fbe\u5f0f<\/b>\u3002\u6bd4\u5982\uff1a<\/li>\n<\/ul>\n<p align=\"left\">\n<ul>\n<li>Python\u4f7f\u7528y if cond else x\u8868\u793a\u6761\u4ef6\u8868\u8fbe\u5f0f\u3002\u610f\u601d\u662f\u5f53cond\u4e3a\u771f\u65f6\uff0c\u8868\u8fbe\u5f0f\u7684\u503c\u4e3ay\uff0c\u5426\u5219\u8868\u8fbe\u5f0f\u7684\u503c\u4e3ax\u3002\u76f8\u5f53\u4e8eC++\u548cJava\u91cc\u7684cond?y:x\u3002<\/li>\n<\/ul>\n<p align=\"left\">\n<ul>\n<li>Python\u533a\u5206\u5217\u8868(list)\u548c\u5143\u7ec4(tuple)\u4e24\u79cd\u7c7b\u578b\u3002list\u7684\u5199\u6cd5\u662f[1,2,3]\uff0c\u800ctuple\u7684\u5199\u6cd5\u662f(1,2,3)\u3002\u53ef\u4ee5\u6539\u53d8list\u4e2d\u7684\u5143\u7d20\uff0c\u800c\u4e0d\u80fd\u6539\u53d8tuple\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0ctuple\u7684\u62ec\u53f7\u53ef\u4ee5\u7701\u7565\u3002tuple\u5bf9\u4e8e\u8d4b\u503c\u8bed\u53e5\u6709\u7279\u6b8a\u7684\u5904\u7406\u3002\u56e0\u6b64\uff0c\u53ef\u4ee5\u540c\u65f6\u8d4b\u503c\u7ed9\u591a\u4e2a\u53d8\u91cf\uff0c\u6bd4\u5982\uff1a<\/li>\n<\/ul>\n<p align=\"left\">\n<ul>\n<li>Python\u4f7f\u7528<b>&#8216;(<\/b><b>\u5355\u5f15\u53f7<\/b><b>)<\/b><b>\u548c<\/b><b>&#8220;(<\/b><b>\u53cc\u5f15\u53f7<\/b><b>)<\/b>\u6765\u8868\u793a\u5b57\u7b26\u4e32\u3002\u4e0ePerl\u3001Unix Shell\u8bed\u8a00\u6216\u8005Ruby\u3001Groovy\u7b49\u8bed\u8a00\u4e0d\u4e00\u6837\uff0c<b><span style=\"text-decoration: underline;\">\u4e24\u79cd\u7b26\u53f7\u4f5c\u7528\u76f8\u540c<\/span><\/b>\u3002\u4e00\u822c\u5730\uff0c\u5982\u679c\u5b57\u7b26\u4e32\u4e2d\u51fa\u73b0\u4e86\u53cc\u5f15\u53f7\uff0c\u5c31\u4f7f\u7528\u5355\u5f15\u53f7\u6765\u8868\u793a\u5b57\u7b26\u4e32;\u53cd\u4e4b\u5219\u4f7f\u7528\u53cc\u5f15\u53f7\u3002\u5982\u679c\u90fd\u6ca1\u6709\u51fa\u73b0\uff0c\u5c31\u4f9d\u4e2a\u4eba\u559c\u597d\u9009\u62e9\u3002\u51fa\u73b0\u5728\u5b57\u7b26\u4e32\u4e2d\u7684(\u53cd\u659c\u6760)\u88ab\u89e3\u91ca\u4e3a\u7279\u6b8a\u5b57\u7b26\uff0c\u6bd4\u5982n\u8868\u793a\u6362\u884c\u7b26\u3002<b>\u8868\u8fbe\u5f0f\u524d\u52a0<\/b><b>r<\/b><b>\u6307\u793a<\/b><b>Python<\/b><b>\u4e0d\u89e3\u91ca\u5b57\u7b26\u4e32\u4e2d\u51fa\u73b0\u7684<\/b><b><\/b><b>\u3002\u8fd9\u79cd\u5199\u6cd5\u901a\u5e38\u7528\u4e8e\u7f16\u5199\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u8005<\/b><b>Windows<\/b><b>\u6587\u4ef6\u8def\u5f84\u3002<\/b><b><\/b><\/li>\n<li>Python\u652f\u6301\u5217\u8868\u5207\u5272(list slices)\uff0c\u53ef\u4ee5\u53d6\u5f97\u5b8c\u6574\u5217\u8868\u7684\u4e00\u90e8\u5206\u3002\u652f\u6301\u5207\u5272\u64cd\u4f5c\u7684\u7c7b\u578b\u6709str, bytes, list, tuple\u7b49\u3002\u5b83\u7684\u8bed\u6cd5\u662f&#8230;[left:right]\u6216\u8005&#8230;[left:right:stride]\u3002\u5047\u5b9anums\u53d8\u91cf\u7684\u503c\u662f[1, 3, 5, 7, 8, 13, 20]\uff0c\u90a3\u4e48\u4e0b\u9762\u51e0\u4e2a\u8bed\u53e5\u4e3a\u771f\uff1a\n<ul>\n<li>nums[2:5] == [5, 7, 8]\u00a0\u4ece\u4e0b\u6807\u4e3a2\u7684\u5143\u7d20\u5207\u5272\u5230\u4e0b\u6807\u4e3a5\u7684\u5143\u7d20\uff0c\u4f46\u4e0d\u5305\u542b\u4e0b\u6807\u4e3a5\u7684\u5143\u7d20\u3002<\/li>\n<li>nums[1:] == [3, 5, 7, 8, 13, 20]\u00a0\u5207\u5272\u5230\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u3002<\/li>\n<li>nums[:-3] == [1, 3, 5, 7]\u00a0\u4ece\u6700\u5f00\u59cb\u7684\u5143\u7d20\u4e00\u76f4\u5207\u5272\u5230\u5012\u6570\u7b2c3\u4e2a\u5143\u7d20\u3002<\/li>\n<li>nums[:] == [1, 3, 5, 7, 8, 13, 20]\u00a0\u8fd4\u56de\u6240\u6709\u5143\u7d20\u3002\u6539\u53d8\u65b0\u7684\u5217\u8868\u4e0d\u4f1a\u5f71\u54cd\u5230nums\u3002<\/li>\n<li>nums[1:5:2] == [3, 7]\u00a0\u4ece\u4e0b\u6807\u4e3a1\u7684\u5143\u7d20\u5207\u5272\u5230\u4e0b\u6807\u4e3a5\u7684\u5143\u7d20\u4f46\u4e0d\u5305\u542b\u4e0b\u6807\u4e3a5\u7684\u5143\u7d20\uff0c\u4e14\u6b65\u957f\u4e3a2<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p align=\"left\">\n<div>\n<p align=\"left\">\n<\/div>\n<p align=\"left\">\n<h3>\u51fd\u6570<\/h3>\n<p>Python\u7684\u51fd\u6570\u652f\u6301\u9012\u5f52\u3001\u9ed8\u8ba4\u53c2\u6570\u503c\u3001\u53ef\u53d8\u53c2\u6570\uff0c\u4f46\u4e0d\u652f\u6301\u51fd\u6570\u91cd\u8f7d\u3002\u4e3a\u4e86\u589e\u5f3a\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u540e\u4e66\u5199\u201c\u6587\u6863\u5b57\u7b26\u4e32\u201d(Documentation Strings\uff0c\u6216\u8005\u7b80\u79f0docstrings)\uff0c\u7528\u4e8e\u89e3\u91ca\u51fd\u6570\u7684\u4f5c\u7528\u3001\u53c2\u6570\u7684\u7c7b\u578b\u4e0e\u610f\u4e49\u3001\u8fd4\u56de\u503c\u7c7b\u578b\u4e0e\u53d6\u503c\u8303\u56f4\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>help()<\/code>\u6253\u5370\u51fa\u51fd\u6570\u7684\u4f7f\u7528\u5e2e\u52a9\u3002\u6bd4\u5982\uff1a<\/p>\n<div><\/div>\n<p align=\"left\">\n<h3>\u5bf9\u8c61\u7684\u65b9\u6cd5<\/h3>\n<p>\u5bf9\u8c61\u7684\u65b9\u6cd5\u662f\u6307\u7ed1\u5b9a\u5230\u5bf9\u8c61\u7684\u51fd\u6570\u3002\u8c03\u7528\u5bf9\u8c61\u65b9\u6cd5\u7684\u8bed\u6cd5\u662f<code>instance.method(arguments)<\/code>\u3002\u5b83\u7b49\u4ef7\u4e8e\u8c03\u7528<code>Class.method(instance, arguments)<\/code>\u3002\u5f53\u5b9a\u4e49\u5bf9\u8c61\u65b9\u6cd5\u65f6\uff0c\u5fc5\u987b\u663e\u5f0f\u5730\u5b9a\u4e49\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u4e00\u822c\u8be5\u53c2\u6570\u540d\u90fd\u4f7f\u7528<code>self<\/code>\uff0c\u7528\u4e8e\u8bbf\u95ee\u5bf9\u8c61\u7684\u5185\u90e8\u6570\u636e\u3002\u8fd9\u91cc\u7684<code>self<\/code>\u76f8\u5f53\u4e8eC++, Java\u91cc\u9762\u7684<code>this<\/code>\u53d8\u91cf\uff0c\u4f46\u662f\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u5176\u5b83\u5408\u6cd5\u7684\u53c2\u6570\u540d\uff0c\u6bd4\u5982<code>this<\/code>\u00a0\u548c\u00a0<code>mine<\/code>\u7b49\uff0c<code><b>self<\/b><\/code><b>\u4e0e<\/b><b>C++,Java<\/b><b>\u91cc\u9762\u7684<\/b><code><b>this<\/b><\/code><b>\u4e0d\u5b8c\u5168\u4e00\u6837<\/b>\uff0c\u5b83\u53ef\u4ee5\u88ab\u770b\u4f5c\u662f\u4e00\u4e2a\u4e60\u60ef\u6027\u7684\u7528\u6cd5\uff0c\u6211\u4eec\u4f20\u5165\u4efb\u4f55\u5176\u5b83\u7684\u5408\u6cd5\u540d\u79f0\u90fd\u884c\uff0c\u6bd4\u5982\uff1a<\/p>\n<p align=\"left\">\n<div>\n<p align=\"left\">Python\u8ba4\u8bc6\u4e00\u4e9b\u4ee5\u201c__\u201d\u5f00\u59cb\u5e76\u4ee5\u201c__\u201d\u7ed3\u675f\u7684\u7279\u6b8a\u65b9\u6cd5\u540d\uff0c\u5b83\u4eec\u7528\u4e8e\u5b9e\u73b0\u8fd0\u7b97\u7b26\u91cd\u8f7d\u548c\u5b9e\u73b0\u591a\u79cd\u7279\u6b8a\u529f\u80fd\u3002<\/p>\n<\/div>\n<p align=\"left\">\n<h3>\u7c7b\u578b<\/h3>\n<p>Python\u91c7\u7528<b><i>\u52a8\u6001\u7c7b\u578b\u7cfb\u7edf<\/i><\/b>\u3002\u5728\u7f16\u8bd1\u7684\u65f6\u5019\uff0cPython\u4e0d\u4f1a\u68c0\u67e5\u5bf9\u8c61\u662f\u5426\u62e5\u6709\u88ab\u8c03\u7528\u7684\u65b9\u6cd5\u6216\u8005\u5c5e\u6027\uff0c\u800c\u662f\u76f4\u81f3\u8fd0\u884c\u65f6\uff0c\u624d\u505a\u51fa\u68c0\u67e5\u3002\u6240\u4ee5\u64cd\u4f5c\u5bf9\u8c61\u65f6\u53ef\u80fd\u4f1a\u629b\u51fa\u5f02\u5e38\u3002\u4e0d\u8fc7\uff0c\u867d\u7136Python\u91c7\u7528\u52a8\u6001\u7c7b\u578b\u7cfb\u7edf\uff0c\u5b83\u540c\u65f6\u4e5f\u662f\u5f3a\u7c7b\u578b\u7684\u3002<span style=\"text-decoration: underline;\">Python<\/span><span style=\"text-decoration: underline;\">\u7981\u6b62\u6ca1\u6709\u660e\u786e\u5b9a\u4e49\u7684\u64cd\u4f5c\uff0c\u6bd4\u5982\u6570\u5b57\u52a0\u5b57\u7b26\u4e32\u3002<\/span><br \/>\n\u4e0e\u5176\u5b83\u9762\u5411\u5bf9\u8c61\u8bed\u8a00\u4e00\u6837\uff0cPython\u5141\u8bb8\u7a0b\u5e8f\u5458\u5b9a\u4e49\u7c7b\u578b\u3002\u6784\u9020\u4e00\u4e2a\u5bf9\u8c61\u53ea\u9700\u8981\u50cf\u51fd\u6570\u4e00\u6837\u8c03\u7528\u7c7b\u578b\u5373\u53ef\uff0c\u6bd4\u5982\uff0c\u5bf9\u4e8e\u524d\u9762\u5b9a\u4e49\u7684<code>Fish<\/code>\u7c7b\u578b\uff0c\u4f7f\u7528<code>Fish()<\/code>\u3002\u7c7b\u578b\u672c\u8eab\u4e5f\u662f\u7279\u6b8a\u7c7b\u578b<code>type<\/code>\u7684\u5bf9\u8c61(<code>type<\/code>\u7c7b\u578b\u672c\u8eab\u4e5f\u662f<code>type<\/code>\u5bf9\u8c61)\uff0c\u8fd9\u79cd\u7279\u6b8a\u7684\u8bbe\u8ba1\u5141\u8bb8\u5bf9\u7c7b\u578b\u8fdb\u884c\u53cd\u5c04\u7f16\u7a0b\u3002<br \/>\nPython\u5185\u7f6e\u4e30\u5bcc\u7684\u6570\u636e\u7c7b\u578b\u3002\u4e0eJava\u3001C++\u76f8\u6bd4\uff0c\u8fd9\u4e9b\u6570\u636e\u7c7b\u578b\u6709\u6548\u5730\u51cf\u5c11\u4ee3\u7801\u7684\u957f\u5ea6\u3002\u4e0b\u9762\u8fd9\u4e2a\u5217\u8868\u7b80\u8981\u5730\u63cf\u8ff0\u4e86Python\u5185\u7f6e\u6570\u636e\u7c7b\u578b(\u9002\u7528\u4e8ePython 3.x)\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><b>\u7c7b\u578b<\/b><b><\/b><\/p>\n<\/td>\n<td>\n<p align=\"center\"><b>\u63cf\u8ff0<\/b><b><\/b><\/p>\n<\/td>\n<td>\n<p align=\"center\"><b>\u4f8b\u5b50<\/b><b><\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><a title=\"\u5b57\u7b26\u4e32\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E5%AD%97%E7%AC%A6%E4%B8%B2\">str<\/a><\/p>\n<\/td>\n<td>\u4e00\u4e2a\u7531\u5b57\u7b26\u7ec4\u6210\u7684\u4e0d\u53ef\u66f4\u6539\u7684\u6709\u4e32\u884c\u3002\u5728Python 3.x\u91cc\uff0c\u5b57\u7b26\u4e32\u7531Unicode\u5b57\u7b26\u7ec4\u6210\u3002<\/td>\n<td><code>'Wikipedia'<\/code><br \/>\n<code>\"Wikipedia\"<\/code><br \/>\n<code>\"\"\"Spanning<\/code><br \/>\n<code>multiple<\/code><br \/>\n<code>lines\"\"\"<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>bytes<\/code><\/td>\n<td>\u4e00\u4e2a\u7531\u5b57\u8282\u7ec4\u6210\u7684\u4e0d\u53ef\u66f4\u6539\u7684\u6709\u4e32\u884c\u3002<\/td>\n<td><code>b'Some ASCII'<\/code><br \/>\n<code>b\"Some ASCII\"<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>list<\/code><\/td>\n<td>\u53ef\u4ee5\u5305\u542b\u591a\u79cd\u7c7b\u578b\u7684\u53ef\u6539\u53d8\u7684\u6709\u4e32\u884c<\/td>\n<td><code>[4.0, 'string', True]<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>tuple<\/code><\/td>\n<td>\u53ef\u4ee5\u5305\u542b\u591a\u79cd\u7c7b\u578b\u7684\u4e0d\u53ef\u6539\u53d8\u7684\u6709\u4e32\u884c<\/td>\n<td><code>(4.0, 'string', True)<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>set<\/code>,<code>frozenset<\/code><\/td>\n<td>\u4e0e\u6570\u5b66\u4e2d\u96c6\u5408\u7684\u6982\u5ff5\u7c7b\u4f3c\u3002\u65e0\u5e8f\u7684\u3001\u6bcf\u4e2a\u5143\u7d20\u552f\u4e00\u3002<\/td>\n<td><code>{4.0, 'string', True}<\/code><br \/>\n<code>frozenset([4.0, 'string', True])<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>dict<\/code><\/td>\n<td>\u4e00\u4e2a\u53ef\u6539\u53d8\u7684\u7531\u952e\u503c\u5bf9\u7ec4\u6210\u7684\u65e0\u4e32\u884c\u3002<\/td>\n<td><code>{'key1': 1.0, 3: False}<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>int<\/code><\/td>\n<td>\u7cbe\u5ea6\u4e0d\u9650\u7684\u6574\u6570<\/td>\n<td><code>42<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>float<\/code><\/td>\n<td>\u6d6e\u70b9\u6570\u3002\u7cbe\u5ea6\u4e0e\u7cfb\u7edf\u76f8\u5173\u3002<\/td>\n<td><code>3.1415927<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>complex<\/code><\/td>\n<td>\u590d\u6570<\/td>\n<td><code>3+2.7j<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>bool<\/code><\/td>\n<td>\u903b\u8f91\u503c\u3002\u53ea\u6709\u4e24\u4e2a\u503c\uff1a\u771f\u3001\u5047<\/td>\n<td><code>True<\/code><br \/>\n<code>False<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div>\n\u9664\u4e86\u5404\u79cd\u6570\u636e\u7c7b\u578b\uff0cPython\u8bed\u8a00\u8fd8\u7528\u7c7b\u578b\u6765\u8868\u793a\u51fd\u6570\u3001\u6a21\u5757\u3001\u7c7b\u578b\u672c\u8eab\u3001\u5bf9\u8c61\u7684\u65b9\u6cd5\u3001\u7f16\u8bd1\u540e\u7684Python\u4ee3\u7801\u3001\u8fd0\u884c\u65f6\u4fe1\u606f\u7b49\u7b49\u3002\u56e0\u6b64\uff0cPython\u5177\u5907\u5f88\u5f3a\u7684\u52a8\u6001\u6027\u3002\n<\/div>\n<div>\n<h2>\u5f00\u53d1\u73af\u5883<\/h2>\n<\/div>\n<p>\u9002\u7528\u4e8ePython\u7684<a title=\"\u96c6\u6210\u5f00\u53d1\u73af\u5883\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E9%9B%86%E6%88%90%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83\">\u96c6\u6210\u5f00\u53d1\u73af\u5883<\/a>\uff08IDE\uff09\u8f6f\u4ef6\uff0c\u9664\u4e86\u6807\u51c6\u4e8c\u8fdb\u5236\u53d1\u5e03\u5305\u6240\u9644\u7684IDLE\u4e4b\u5916\uff0c\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u9009\u62e9\u3002\u5176\u4e2d\u6709\u4e9b\u8f6f\u4ef6\u8bbe\u8ba1\u6709\u8bed\u6cd5\u7740\u8272\u3001\u8bed\u6cd5\u68c0\u67e5\u3001\u8fd0\u884c<a title=\"\u8c03\u8bd5\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E8%B0%83%E8%AF%95\">\u8c03\u8bd5<\/a>\u3001\u81ea\u52a8\u8865\u5168\u3001\u667a\u80fd\u611f\u77e5\u7b49\u4fbf\u5229\u529f\u80fd\u3002\u7531\u4e8ePython\u7684<a title=\"\u8de8\u5e73\u53f0\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E8%B7%A8%E5%B9%B3%E5%8F%B0\">\u8de8\u5e73\u53f0<\/a>\u51fa\u8eab\uff0c\u8fd9\u4e9b\u8f6f\u4ef6\u5f80\u5f80\u4e5f\u5177\u5907\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u6216\u4e00\u5b9a\u7684\u79fb\u690d\u6027\u3002<br \/>\n\u800c\u5f88\u591a\u5e76\u975e\u96c6\u6210\u5f00\u53d1\u73af\u5883\u8f6f\u4ef6\u7684<a title=\"\u6587\u672c\u7f16\u8f91\u5668\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8\">\u6587\u672c\u7f16\u8f91\u5668<\/a>\uff0c\u4e5f\u5bf9Python\u6709\u4e0d\u540c\u7a0b\u5ea6\u7684\u652f\u6301\uff0c\u5e76\u4e14\u52a0\u4e0a\u4e13\u95e8\u4e3aPython\u8bbe\u8ba1\u7684\u7f16\u8f91\u5668\u63d2\u4ef6\u4e5f\u4f1a\u6709\u5f88\u9ad8\u7684\u53ef\u7528\u6027\u3002<br \/>\n\u4e13\u95e8\u4e3aPython\u8bbe\u8ba1\u7684IDE\u8f6f\u4ef6\uff1a<\/p>\n<ul>\n<li><a title=\"Eric(Python)\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Eric(Python)&amp;action=edit&amp;redlink=1\">Eric<\/a>\uff1a\u57fa\u4e8e<a title=\"PyQt\" href=\"http:\/\/zh.wikipedia.org\/wiki\/PyQt\">PyQt<\/a>\u7684\u81ea\u7531\u8f6f\u4ef6\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u652f\u6301\u81ea\u52a8\u8865\u5168\u3001\u667a\u80fd\u611f\u77e5\u3001\u81ea\u52a8\u8bed\u6cd5\u68c0\u67e5\u3001\u5de5\u7a0b\u7ba1\u7406\u3001svn\/cvs\u96c6\u6210\u3001\u81ea\u52a8\u5355\u5143\u6d4b\u8bd5\u7b49\u529f\u80fd\u3002\u8c03\u8bd5\u529f\u80fd\u4e0eVisual Studio\u548cEclipse\u7c7b\u4f3c\u3002\u76ee\u524d\u540c\u65f6\u6709\u4e24\u4e2a\u7248\u672c\u3002Eric4\u652f\u6301Python2.x\uff0cEric5\u652f\u6301Python3.x\u3002\u4f7f\u7528\u524d\u9700\u8981\u5148\u5b89\u88c5\u76f8\u5e94\u7684PyQt\u7248\u672c\u3002<\/li>\n<li><a title=\"IDLE\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=IDLE&amp;action=edit&amp;redlink=1\">IDLE<\/a>\uff1aPython\u201c\u6807\u51c6\u201dIDE\u3002\u4e00\u822c\u968fPython\u800c\u5b89\u88c5\uff0c\u652f\u6301\u8f83\u5c11\u7684\u7f16\u8f91\u529f\u80fd\u3002\u8c03\u8bd5\u529f\u80fd\u4e5f\u6bd4\u8f83\u5f31\u3002<\/li>\n<li><a title=\"Komodo\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Komodo&amp;action=edit&amp;redlink=1\">Komodo<\/a>\u548c<a title=\"Komodo Edit\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Komodo_Edit&amp;action=edit&amp;redlink=1\">Komodo Edit<\/a>\uff1a\u540e\u8005\u662f\u524d\u8005\u7684\u514d\u8d39\u7cbe\u7b80\u7248\u3002\u4e5f\u53ef\u4ee5\u7528\u4e8ePHP\uff0cRuby\uff0cJavascript\uff0cPerl\uff0cWeb\u548c\u4e91\u5f00\u53d1\u3002<\/li>\n<li><a title=\"PyCharm\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=PyCharm&amp;action=edit&amp;redlink=1\">PyCharm<\/a>\uff1a\u7531<a title=\"JetBrains\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=JetBrains&amp;action=edit&amp;redlink=1\">JetBrains<\/a>\u6253\u9020\uff0c\u8be5\u516c\u53f8\u7684Java IDE\u8f6f\u4ef6IntelliJ\u62e5\u6709\u6d77\u91cf\u7684\u7528\u6237\uff1bPyCharm\u5177\u5907\u4e00\u822cIDE\u7684\u529f\u80fd\uff0c\u6bd4\u5982\uff0c \u8c03\u8bd5\u3001\u8bed\u6cd5\u9ad8\u4eae\u3001Project\u7ba1\u7406\u3001\u4ee3\u7801\u8df3\u8f6c\u3001\u667a\u80fd\u63d0\u793a\u3001\u81ea\u52a8\u5b8c\u6210\u3001\u5355\u5143\u6d4b\u8bd5\u3001\u7248\u672c\u63a7\u5236\u7b49\u7b49\uff0c\u540c\u65f6\u53e6\u5916\uff0cPyCharm\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5f88\u597d\u7684\u529f\u80fd\u7528\u4e8eDjango\u5f00\u53d1\uff0c\u540c\u65f6\u652f\u6301Google App Engine\uff0c\u66f4\u9177\u7684\u662f\uff0cPyCharm\u652f\u6301IronPython\u3002PyCharm\u662f\u5546\u4e1a\u8f6f\u4ef6\uff0c\u76ee\u524d\u5df2\u7ecf\u52302.5\u7248\u672c\u3002<\/li>\n<li><a title=\"PythonWin\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=PythonWin&amp;action=edit&amp;redlink=1\">PythonWin<\/a>\uff1a\u5305\u542b\u5728pywin32\u5185\u7684\u7f16\u8f91\u5668\uff0c\u4ec5\u9002\u7528\u4e8eWindows\u3002<\/li>\n<li><a title=\"SPE\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=SPE&amp;action=edit&amp;redlink=1\">SPE<\/a>\uff08Stani&#8217;s Python Editor\uff09\uff1a\u529f\u80fd\u8f83\u591a\u7684\u514d\u8d39\u8f6f\u4ef6\uff0c\u4f9d\u8d56<a title=\"WxPython\" href=\"http:\/\/zh.wikipedia.org\/wiki\/WxPython\">wxPython<\/a>\u3002<\/li>\n<li><a title=\"Ulipad\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Ulipad&amp;action=edit&amp;redlink=1\">Ulipad<\/a>\uff1a\u529f\u80fd\u8f83\u5168\u7684\u514d\u8d39\u8f6f\u4ef6\uff0c\u4f9d\u8d56<a title=\"WxPython\" href=\"http:\/\/zh.wikipedia.org\/wiki\/WxPython\">wxPython<\/a>\u3002<\/li>\n<li><a title=\"WingIDE\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=WingIDE&amp;action=edit&amp;redlink=1\">WingIDE<\/a>\uff1a\u53ef\u80fd\u662f\u529f\u80fd\u6700\u5168\u7684IDE\uff0c\u4f46\u4e0d\u662f\u514d\u8d39\u8f6f\u4ef6\u3002<\/li>\n<li><a title=\"PyScripter\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=PyScripter&amp;action=edit&amp;redlink=1\">PyScripter<\/a>\uff1a\u529f\u80fd\u8f83\u5168\u7684\u5f00\u6e90IDE\uff0c\u4f7f\u7528Delphi\u5f00\u53d1\u3002<\/li>\n<\/ul>\n<p>\u901a\u7528IDE \/ \u6587\u672c\u7f16\u8f91\u5668\uff1a<\/p>\n<ul>\n<li><a title=\"Eclipse\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Eclipse\">eclipse<\/a>\u00a0+ pydev\u63d2\u4ef6\uff0c\u76ee\u524d\u5bf9Python 3.X\u53ea\u652f\u6301\u52303.0<\/li>\n<li><a title=\"Emacs\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Emacs\">emacs<\/a>\u00a0+ \u63d2\u4ef6<\/li>\n<li><a title=\"NetBeans\" href=\"http:\/\/zh.wikipedia.org\/wiki\/NetBeans\">NetBeans<\/a>\u00a0+ \u63d2\u4ef6<\/li>\n<li><a title=\"SlickEdit\" href=\"http:\/\/zh.wikipedia.org\/wiki\/SlickEdit\">SlickEdit<\/a><\/li>\n<li><a title=\"TextMate\" href=\"http:\/\/zh.wikipedia.org\/wiki\/TextMate\">TextMate<\/a><\/li>\n<li><a title=\"Python Tools for Visual Studio\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Python_Tools_for_Visual_Studio&amp;action=edit&amp;redlink=1\">Python Tools for Visual Studio<\/a><\/li>\n<li><a title=\"Vim\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Vim\">Vim<\/a>\u00a0+ \u63d2\u4ef6<\/li>\n<li><a title=\"Sublime Text\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Sublime_Text\">Sublime Text<\/a>\u00a0+ \u63d2\u4ef6<\/li>\n<li><a title=\"EditPlus\" href=\"http:\/\/zh.wikipedia.org\/wiki\/EditPlus\">EditPlus<\/a><\/li>\n<li><a title=\"UltraEdit\" href=\"http:\/\/zh.wikipedia.org\/wiki\/UltraEdit\">UltraEdit<\/a><\/li>\n<li><a title=\"PSPad\" href=\"http:\/\/zh.wikipedia.org\/wiki\/PSPad\">PSPad<\/a><\/li>\n<\/ul>\n<div><\/div>\n<p>&nbsp;<\/p>\n<p align=\"left\">\n<p align=\"left\">\u5b98\u7f51\uff08\u82f1\u6587\uff09\uff1ahttp:\/\/www.djangoproject.com\/<\/p>\n<p align=\"left\">\u81ea\u5b66\u6750\u6599\uff08\u4e2d\u6587\uff09\uff1a<a href=\"http:\/\/djangobook.py3k.cn\/2.0\/\">http:\/\/djangobook.py3k.cn\/2.0\/<\/a><\/p>\n<p><b>Django<\/b>\u662f\u4e00\u4e2a<a title=\"\u5f00\u653e\u6e90\u4ee3\u7801\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E5%BC%80%E6%94%BE%E6%BA%90%E4%BB%A3%E7%A0%81\">\u5f00\u653e\u6e90\u4ee3\u7801<\/a>\u7684<a title=\"Web\u5e94\u7528\u6846\u67b6\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Web%E5%BA%94%E7%94%A8%E6%A1%86%E6%9E%B6\">Web\u5e94\u7528\u6846\u67b6<\/a>\uff0c\u7531<a title=\"Python\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Python\">Python<\/a>\u5199\u6210\u3002\u91c7\u7528\u4e86<a title=\"MVC\" href=\"http:\/\/zh.wikipedia.org\/wiki\/MVC\">MVC<\/a>\u7684<a title=\"\u8f6f\u4ef6\u8bbe\u8ba1\u6a21\u5f0f\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E8%BD%AF%E4%BB%B6%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F\">\u8f6f\u4ef6\u8bbe\u8ba1\u6a21\u5f0f<\/a>\uff0c\u5373\u6a21\u578bM\uff0c\u89c6\u56feV\u548c\u63a7\u5236\u5668C\u3002\u5b83\u6700\u521d\u662f\u88ab\u5f00\u53d1\u6765\u7528\u4e8e\u7ba1\u7406<a title=\"\u52b3\u4f26\u65af\u51fa\u7248\u96c6\u56e2\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=%E5%8A%B3%E4%BC%A6%E6%96%AF%E5%87%BA%E7%89%88%E9%9B%86%E5%9B%A2&amp;action=edit&amp;redlink=1\">\u52b3\u4f26\u65af\u51fa\u7248\u96c6\u56e2<\/a>\u65d7\u4e0b\u7684\u4e00\u4e9b\u4ee5\u65b0\u95fb\u5185\u5bb9\u4e3a\u4e3b\u7684\u7f51\u7ad9\u7684\u3002\u5e76\u4e8e<a title=\"2005\u5e74\" href=\"http:\/\/zh.wikipedia.org\/wiki\/2005%E5%B9%B4\">2005\u5e74<\/a>7\u6708\u5728<a title=\"BSD\u8bb8\u53ef\u8bc1\" href=\"http:\/\/zh.wikipedia.org\/wiki\/BSD%E8%AE%B8%E5%8F%AF%E8%AF%81\">BSD\u8bb8\u53ef\u8bc1<\/a>\u4e0b\u53d1\u5e03\u3002\u8fd9\u5957\u6846\u67b6\u662f\u4ee5<a title=\"\u6bd4\u5229\u65f6\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E6%AF%94%E5%88%A9%E6%97%B6\">\u6bd4\u5229\u65f6<\/a>\u7684<a title=\"\u5409\u666e\u8d5b\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E5%90%89%E6%99%AE%E8%B5%9B\">\u5409\u666e\u8d5b<\/a><a title=\"\u7235\u58eb\u4e50\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E7%88%B5%E5%A3%AB%E4%B9%90\">\u7235\u58eb<\/a>\u5409\u4ed6\u624b<a title=\"Django Reinhardt\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Django_Reinhardt&amp;action=edit&amp;redlink=1\">Django Reinhardt<\/a>\u6765\u547d\u540d\u7684\u3002<br \/>\nDjango\u7684\u4e3b\u8981\u76ee\u6807\u662f\u4f7f\u5f97\u5f00\u53d1\u590d\u6742\u7684\u3001\u6570\u636e\u5e93\u9a71\u52a8\u7684\u7f51\u7ad9\u53d8\u5f97\u7b80\u5355\u3002Django\u6ce8\u91cd\u7ec4\u4ef6\u7684\u91cd\u7528\u6027\u548c\u201c\u53ef\u63d2\u62d4\u6027\u201d\uff0c<a title=\"\u654f\u6377\u5f00\u53d1\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E6%95%8F%E6%8D%B7%E5%BC%80%E5%8F%91\">\u654f\u6377\u5f00\u53d1<\/a>\u548c<a title=\"\u4e00\u6b21\u4e14\u4ec5\u4e00\u6b21\" href=\"http:\/\/zh.wikipedia.org\/wiki\/%E4%B8%80%E6%AC%A1%E4%B8%94%E4%BB%85%E4%B8%80%E6%AC%A1\">DRY\u6cd5\u5219<\/a>\uff08Don&#8217;t Repeat Yourself\uff09\u3002\u5728Django\u4e2d<a title=\"Python\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Python\">Python<\/a>\u88ab\u666e\u904d\u4f7f\u7528\uff0c\u751a\u81f3\u5305\u62ec\u914d\u7f6e\u6587\u4ef6\u548c\u6570\u636e\u6a21\u578b\u3002<br \/>\nDjango \u53ef\u4ee5\u8fd0\u884c\u5728\u542f\u7528\u4e86\u00a0<a title=\"Mod python\uff08\u9875\u9762\u4e0d\u5b58\u5728\uff09\" href=\"http:\/\/zh.wikipedia.org\/w\/index.php?title=Mod_python&amp;action=edit&amp;redlink=1\">mod python<\/a>\u00a0\u7684\u00a0<a title=\"Apache 2\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Apache_2\">Apache 2<\/a>\u00a0\u4e0a\uff0c\u6216\u662f\u4efb\u4f55<a title=\"WSGI\" href=\"http:\/\/zh.wikipedia.org\/wiki\/WSGI\">WSGI<\/a>\u517c\u5bb9\u7684Web\u670d\u52a1\u5668\u3002 Django\u4e5f\u6709\u542f\u52a8<a title=\"FastCGI\" href=\"http:\/\/zh.wikipedia.org\/wiki\/FastCGI\">FastCGI<\/a>\u670d\u52a1\u7684\u80fd\u529b\uff0c\u56e0\u6b64\u80fd\u591f\u5e94\u7528\u4e8e\u4efb\u4f55\u652f\u6301<a title=\"FastCGI\" href=\"http:\/\/zh.wikipedia.org\/wiki\/FastCGI\">FastCGI<\/a>\u7684\u673a\u5668\u4e0a\u3002<br \/>\n\u4e0b\u5217\u6570\u636e\u5e93\u5f15\u64ce\u88abDjango\u5b98\u65b9\u652f\u6301\uff1a<\/p>\n<ul>\n<li><a title=\"PostgreSQL\" href=\"http:\/\/zh.wikipedia.org\/wiki\/PostgreSQL\">PostgreSQL<\/a><\/li>\n<li><a title=\"MySQL\" href=\"http:\/\/zh.wikipedia.org\/wiki\/MySQL\">MySQL<\/a><\/li>\n<li><a title=\"SQLite\" href=\"http:\/\/zh.wikipedia.org\/wiki\/SQLite\">SQLite<\/a><\/li>\n<li><a title=\"Oracle\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Oracle\">Oracle<\/a><\/li>\n<\/ul>\n<p><a title=\"Microsoft\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Microsoft\">Microsoft<\/a>\u00a0<a title=\"SQL Server\" href=\"http:\/\/zh.wikipedia.org\/wiki\/SQL_Server\">SQL Server<\/a>\u00a0\u7684\u9002\u914d\u5668\u6b63\u5728\u5f00\u53d1\u4e2d\uff0c\u5904\u4e8e\u8bd5\u9a8c\u9636\u6bb5\u3002\uff08\u6ce8\uff1a<a title=\"SQL Server\" href=\"http:\/\/zh.wikipedia.org\/wiki\/SQL_Server\">SQL Server<\/a>\u7684\u652f\u6301\u57281.0\u7248\u672c\u4e2d\u5df2\u7ecf\u88ab\u5b8c\u5168\u53bb\u9664\uff09<br \/>\nDjango1.0\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528<a title=\"Jython\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Jython\">Jython<\/a>\u8fd0\u884c\u5728\u4efb\u4f55<a title=\"J2EE\" href=\"http:\/\/zh.wikipedia.org\/wiki\/J2EE\">J2EE<\/a>\u670d\u52a1\u5668\u3002<\/p>\n<p align=\"left\">\n","protected":false},"excerpt":{"rendered":"<p>Python\u5165\u95e8 By nincompoop \u56fe\u6587PDF\u4e0b\u8f7d\uff1a Python\u8bb2\u4e49 \u53c2\u8003\u6559\u7a0b\uff1a http:\/\/www.cnblogs.com\/known\/archive\/2010\/07\/31\/1789249.html &nbsp; \u5b98\u65b9\u4ecb\u7ecd\uff1aPython\u662f\u4e00\u79cd\u7b80\u5355\u6613\u5b66\uff0c\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b83\u6709\u9ad8\u6548\u7387\u7684\u9ad8\u5c42\u6570\u636e\u7ed3\u6784\uff0c\u7b80\u5355\u800c\u6709\u6548\u5730\u5b9e\u73b0\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u3002Python\u7b80\u6d01\u7684\u8bed\u6cd5\u548c\u5bf9\u52a8\u6001\u8f93\u5165\u7684\u652f\u6301\uff0c\u518d\u52a0\u4e0a\u89e3\u91ca\u6027\u8bed\u8a00\u7684\u672c\u8d28\uff0c\u4f7f\u5f97\u5b83\u5728\u5927\u591a\u6570\u5e73\u53f0\u4e0a\u7684\u8bb8\u591a\u9886\u57df\u90fd\u662f\u4e00\u4e2a\u7406\u60f3\u7684\u811a\u672c\u8bed\u8a00\uff0c\u7279\u522b\u9002\u7528\u4e8e\u5feb\u901f\u7684\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u3002 \u521b\u9020\u8005\uff1aGuido van Rossum\uff08\u5409\u591a\u00b7\u8303\u7f57\u82cf\u59c6\u3010\u8377\u5170\u3011\uff09 \u5b83\u7684\u7279\u8272\uff1a\u7b80\u5355\u3001\u6613\u5b66\u3001\u514d\u8d39\u3001\u5f00\u6e90\u3001\u9ad8\u5c42\u8bed\u8a00\u3001\u53ef\u79fb\u690d\u6027\u3001\u89e3\u91ca\u6027\u3001\u9762\u5411\u5bf9\u8c61\u3001\u53ef\u6269\u5c55\u6027\u3001\u53ef\u5d4c\u5165\u6027\u3001\u4e30\u5bcc\u7684\u5e93\u3002 \u5b98\u7f51\uff1ahttp:\/\/python.org\/ Python\u652f\u6301\u547d\u4ee4\u5f0f\u7a0b\u5e8f\u8bbe\u8ba1\u3001\u9762\u5411\u5bf9\u8c61\u7a0b\u5e8f\u8bbe\u8ba1\u3001\u51fd\u6570\u5f0f\u7f16\u7a0b\u3001\u9762\u5411\u5207\u9762\u7f16\u7a0b\u3001\u6cdb\u578b\u7f16\u7a0b\u591a\u79cd\u7f16\u7a0b\u8303\u5f0f\u3002\u4e0eScheme\u3001Ruby\u3001Perl\u3001Tcl\u7b49\u52a8\u6001\u8bed\u8a00\u4e00\u6837\uff0cPython\u5177\u5907\u5783\u573e\u56de\u6536\u529f\u80fd\uff0c\u80fd\u591f\u81ea\u52a8\u7ba1\u7406\u5b58\u50a8\u5668\u4f7f\u7528\u3002\u5b83\u7ecf\u5e38\u88ab\u5f53\u4f5c\u811a\u672c\u8bed\u8a00\u7528\u4e8e\u5904\u7406\u7cfb\u7edf\u7ba1\u7406\u4efb\u52a1\u548c\u7f51\u7edc\u7a0b\u5e8f\u7f16\u5199\uff0c\u7136\u800c\u5b83\u4e5f\u975e\u5e38\u9002\u5408\u5b8c\u6210\u5404\u79cd\u9ad8\u7ea7\u4efb\u52a1\u3002Python\u865a\u62df\u673a\u672c\u8eab\u51e0\u4e4e\u53ef\u4ee5\u5728\u6240\u6709\u7684\u4f5c\u4e1a\u7cfb\u7edf\u4e2d\u8fd0\u884c\u3002 \u7248\u672c\uff1a3.x\u4e0e2.x \uff08Python 3.0\u4e8e2008\u5e7412\u67083\u65e5\u53d1\u5e03\uff0c\u6b64\u7248\u4e0d\u5b8c\u5168\u517c\u5bb9\u4e4b\u524d\u7684Python\u6e90\u4ee3\u7801\u3002\u4e0d\u8fc7\uff0c\u5f88\u591a\u65b0\u7279\u6027\u540e\u6765\u4e5f\u88ab\u79fb\u690d\u5230\u65e7\u7684Python 2.6\/2.7\u7248\u672c\u3002\uff09 &nbsp; Hello World \u7a0b\u5e8f \u4e0b\u9762\u662f\u4e00\u4e2a\u5728\u6807\u51c6\u8f93\u8bbe\u5907\u4e0a\u8f93\u51faHello World\u7684\u7b80\u5355\u7a0b\u5e8f\uff0c\u8fd9\u79cd\u7a0b\u5e8f\u901a\u5e38\u4f5c\u4e3a\u5f00\u59cb\u5b66\u4e60\u7f16\u7a0b\u8bed\u8a00\u65f6\u7684\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\uff1a \u9002\u7528\u4e8ePython 3.0\u4ee5\u4e0a\u7248\u672c\u4ee5\u53caPython 2.6\u3001Python 2.7 \u9002\u7528\u4e8ePython 2.6\u4ee5\u4e0b\u7248\u672c\u4ee5\u53caPython 2.6\u3001Python 2.7 print(&#8220;Hello, world!&#8221;) print &#8220;Hello, world!&#8221; \u5c06\u8fd9\u884c\u7a0b\u5e8f\u7801\u4fdd\u5b58\u4e3amyhello.py\u3002\u7136\u540e\u5728Linux\u7ec8\u7aef\u673a\u4e0b\u8f93\u5165python myhello.py\uff0c\u6216\u8005\u5728Windows\u547d\u4ee4\u7f16\u8f91\u5b57\u7b26\u4e0b\u8f93\u5165myhello.py\u8fd0\u884c\u3002Python\u4e5f\u53ef\u4ee5\u5355\u6b65\u76f4\u8bd1\u8fd0\u884c\u3002\u8fd0\u884cPython\u89e3\u91ca\u5668\u8fdb\u5165\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u7684\u73af\u5883\uff0c\u4f60\u53ef\u4ee5\u5728\u63d0\u793a\u7b26\u53f7&gt;&gt;&gt;\u65c1\u8f93\u5165print(&#8220;Hello, world!&#8221;)\uff0c\u6309Enter\u952e\u8f93\u51fa\u7ed3\u679c\uff1a \u9002\u7528\u4e8ePython 3.0\u4ee5\u4e0a\u7248\u672c\u4ee5\u53caPython 2.6\u3001Python 2.7 \u9002\u7528\u4e8ePython 2.6\u4ee5\u4e0b\u7248\u672c\u4ee5\u53caPython 2.6\u3001Python 2.7 &gt;&gt;&gt; print(&#8220;Hello, world!&#8221;) Hello, world! &gt;&gt;&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[89],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-study","category-technical","tag-python"],"_links":{"self":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":0,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}