{"id":986572,"date":"2024-12-27T07:46:05","date_gmt":"2024-12-26T23:46:05","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/986572.html"},"modified":"2024-12-27T07:46:08","modified_gmt":"2024-12-26T23:46:08","slug":"python%e4%ba%a4%e4%ba%92%e6%a8%a1%e5%bc%8f%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/986572.html","title":{"rendered":"python\u4ea4\u4e92\u6a21\u5f0f\u5982\u4f55\u6253\u5f00"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25063110\/fe7e4426-4c84-4028-8537-0e9981371185.webp\" alt=\"python\u4ea4\u4e92\u6a21\u5f0f\u5982\u4f55\u6253\u5f00\" \/><\/p>\n<p><p> <strong>\u6253\u5f00Python\u4ea4\u4e92\u6a21\u5f0f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3001\u7ec8\u7aef\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7b49\u3002<\/strong>\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u6709\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u76f4\u63a5\u8f93\u5165\u201cpython\u201d\u547d\u4ee4\u6765\u542f\u52a8Python\u4ea4\u4e92\u6a21\u5f0f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u548c\u4f7f\u7528Python\u4ea4\u4e92\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u6253\u5f00<\/p>\n<\/p>\n<p><p>Python\u4ea4\u4e92\u6a21\u5f0f\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Linux\u548cmacOS\uff09\u6253\u5f00\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u3002<\/p>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b<code>Win + R<\/code>\u952e\uff0c\u7136\u540e\u8f93\u5165\u201ccmd\u201d\u6765\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u5728macOS\u548cLinux\u7cfb\u7edf\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5feb\u6377\u65b9\u5f0f\u6253\u5f00\u7ec8\u7aef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u8f93\u5165Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\uff08\u5177\u4f53\u53d6\u51b3\u4e8e\u60a8\u7684Python\u5b89\u88c5\uff09\uff0c\u7136\u540e\u6309\u4e0b\u56de\u8f66\u952e\u3002\u8fd9\u5c06\u542f\u52a8Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u60a8\u4f1a\u770b\u5230\u7c7b\u4f3c\u4e8e\u4ee5\u4e0b\u5185\u5bb9\u7684\u63d0\u793a\u7b26\uff1a<\/p>\n<\/p>\n<p><pre><code>Python 3.x.x (default, ... , ...)<\/p>\n<p>[GCC ...] on linux<\/p>\n<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<\/p>\n<p>&gt;&gt;&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u8868\u793a\u60a8\u5df2\u7ecf\u6210\u529f\u8fdb\u5165\u4e86Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5728\u5176\u4e2d\u8f93\u5165Python\u4ee3\u7801\u5e76\u7acb\u5373\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u8f93\u5165\u5e76\u6267\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e0b\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165\u4efb\u4f55\u6709\u6548\u7684Python\u4ee3\u7801\u5e76\u7acb\u5373\u6267\u884c\u3002\u4f8b\u5982\uff0c\u8f93\u5165<code>print(&quot;Hello, World!&quot;)<\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\u952e\uff0c\u60a8\u4f1a\u770b\u5230\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello, World!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u901a\u8fc7\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6253\u5f00<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u547d\u4ee4\u884c\u65b9\u5f0f\uff0c\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6765\u6253\u5f00Python\u4ea4\u4e92\u6a21\u5f0f\u3002\u8bb8\u591aIDE\u90fd\u63d0\u4f9b\u4e86\u4ea4\u4e92\u6a21\u5f0f\u7a97\u53e3\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>PyCharm<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>PyCharm\u662f\u4e00\u6b3e\u6d41\u884c\u7684Python IDE\uff0c\u63d0\u4f9b\u4e86\u96c6\u6210\u7684Python\u63a7\u5236\u53f0\u3002\u5728PyCharm\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u9009\u62e9\u201cView\u201d\u83dc\u5355\uff0c\u7136\u540e\u9009\u62e9\u201cTool Windows\u201d\u4e2d\u7684\u201cPython Console\u201d\u6765\u6253\u5f00\u4ea4\u4e92\u6a21\u5f0f\u3002\u5728\u63a7\u5236\u53f0\u4e2d\uff0c\u60a8\u53ef\u4ee5\u50cf\u5728\u547d\u4ee4\u884c\u4e2d\u4e00\u6837\u8f93\u5165\u548c\u6267\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Jupyter Notebook<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>Jupyter Notebook\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5141\u8bb8\u60a8\u5728\u6d4f\u89c8\u5668\u4e2d\u4ee5\u4ea4\u4e92\u65b9\u5f0f\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u542f\u52a8Jupyter Notebook\u540e\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Notebook\uff0c\u5e76\u5728\u5176\u4e2d\u7684\u6bcf\u4e2a\u5355\u5143\u683c\u4e2d\u8f93\u5165Python\u4ee3\u7801\u3002\u6267\u884c\u5355\u5143\u683c\u540e\uff0c\u60a8\u53ef\u4ee5\u7acb\u5373\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Visual Studio Code (VS Code)<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>VS Code\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u5b89\u88c5Python\u6269\u5c55\u540e\uff0c\u60a8\u53ef\u4ee5\u5728VS Code\u4e2d\u4f7f\u7528\u201cPython: Start REPL\u201d\u547d\u4ee4\u6765\u6253\u5f00\u4ea4\u4e92\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528Python Shell<\/p>\n<\/p>\n<p><p>Python\u5b89\u88c5\u5305\u901a\u5e38\u9644\u5e26\u4e00\u4e2a\u540d\u4e3aIDLE\u7684\u7b80\u5355\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u5b83\u4e5f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u6a21\u5f0f\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u542f\u52a8IDLE<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>\u5728Windows\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u641c\u7d22\u201cIDLE (Python x.x)\u201d\uff0c\u5176\u4e2d\u201cx.x\u201d\u662f\u60a8\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5728macOS\u548cLinux\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>idle<\/code>\u547d\u4ee4\u542f\u52a8IDLE\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528IDLE\u7684\u4ea4\u4e92\u6a21\u5f0f<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>\u542f\u52a8IDLE\u540e\uff0c\u60a8\u4f1a\u770b\u5230\u4e00\u4e2aPython Shell\u7a97\u53e3\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u8f93\u5165Python\u4ee3\u7801\u5e76\u7acb\u5373\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u901a\u8fc7\u5728\u7ebfPython Shell<\/p>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u6ca1\u6709\u5728\u672c\u5730\u5b89\u88c5Python\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5728\u7ebfPython Shell\u6765\u4f53\u9a8c\u4ea4\u4e92\u6a21\u5f0f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6d41\u884c\u7684\u5728\u7ebfPython Shell\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Repl.it<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>Repl.it\u662f\u4e00\u4e2a\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002\u60a8\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u76f4\u63a5\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>PythonAnywhere<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>PythonAnywhere\u662f\u4e00\u4e2a\u63d0\u4f9bPython\u73af\u5883\u7684\u5728\u7ebf\u5e73\u53f0\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u800c\u65e0\u9700\u5728\u672c\u5730\u5b89\u88c5Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>JDoodle<\/strong>\uff1a<\/p>\n<\/p>\n<p><p>JDoodle\u662f\u4e00\u4e2a\u5728\u7ebf\u7f16\u7a0b\u5de5\u5177\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u5e76\u7acb\u5373\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001Python\u4ea4\u4e92\u6a21\u5f0f\u7684\u4f18\u52bf<\/p>\n<\/p>\n<p><p>Python\u4ea4\u4e92\u6a21\u5f0f\u63d0\u4f9b\u4e86\u8bb8\u591a\u4f18\u52bf\uff0c\u4f7f\u5176\u6210\u4e3a\u5b66\u4e60\u548c\u6d4b\u8bd5Python\u4ee3\u7801\u7684\u7406\u60f3\u5de5\u5177\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5373\u65f6\u53cd\u9988<\/strong>\uff1a\u4ea4\u4e92\u6a21\u5f0f\u5141\u8bb8\u60a8\u5728\u8f93\u5165\u4ee3\u7801\u540e\u7acb\u5373\u67e5\u770b\u7ed3\u679c\uff0c\u8fd9\u5bf9\u4e8e\u6d4b\u8bd5\u4ee3\u7801\u7247\u6bb5\u548c\u8c03\u8bd5\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7b80\u5355\u6613\u7528<\/strong>\uff1a\u4ea4\u4e92\u6a21\u5f0f\u4e0d\u9700\u8981\u590d\u6742\u7684\u8bbe\u7f6e\uff0c\u60a8\u53ea\u9700\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b9e\u9a8c\u65b0\u529f\u80fd<\/strong>\uff1a\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e0b\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u5c1d\u8bd5Python\u7684\u65b0\u7279\u6027\u548c\u5e93\uff0c\u4e86\u89e3\u5176\u7528\u6cd5\u548c\u884c\u4e3a\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63d0\u9ad8\u5b66\u4e60\u6548\u7387<\/strong>\uff1a\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u4ea4\u4e92\u6a21\u5f0f\u662f\u4e00\u79cd\u5feb\u901f\u5b66\u4e60\u548c\u7406\u89e3Python\u8bed\u6cd5\u548c\u529f\u80fd\u7684\u6709\u6548\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001Python\u4ea4\u4e92\u6a21\u5f0f\u7684\u5c40\u9650\u6027<\/p>\n<\/p>\n<p><p>\u5c3d\u7ba1Python\u4ea4\u4e92\u6a21\u5f0f\u5177\u6709\u8bb8\u591a\u4f18\u70b9\uff0c\u4f46\u4e5f\u5b58\u5728\u4e00\u4e9b\u5c40\u9650\u6027\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0d\u9002\u5408\u5927\u578b\u9879\u76ee<\/strong>\uff1a\u4ea4\u4e92\u6a21\u5f0f\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u548c\u5b9e\u9a8c\u4ee3\u7801\u7247\u6bb5\uff0c\u5bf9\u4e8e\u5927\u578b\u9879\u76ee\u7684\u5f00\u53d1\u548c\u7ba1\u7406\u5e76\u4e0d\u9002\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u4e0d\u53ef\u4fdd\u5b58<\/strong>\uff1a\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e2d\u8f93\u5165\u7684\u4ee3\u7801\u901a\u5e38\u4e0d\u4f1a\u4fdd\u5b58\uff0c\u56e0\u6b64\u4e00\u65e6\u5173\u95ed\uff0c\u8f93\u5165\u7684\u4ee3\u7801\u5c31\u4f1a\u4e22\u5931\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f3a\u4e4f\u8c03\u8bd5\u5de5\u5177<\/strong>\uff1a\u4ea4\u4e92\u6a21\u5f0f\u7f3a\u4e4f\u9ad8\u7ea7\u8c03\u8bd5\u5de5\u5177\uff0c\u5bf9\u4e8e\u590d\u6742\u7684\u4ee3\u7801\u8c03\u8bd5\u53ef\u80fd\u4e0d\u591f\u5f3a\u5927\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0cPython\u4ea4\u4e92\u6a21\u5f0f\u662f\u4e00\u79cd\u5feb\u901f\u3001\u9ad8\u6548\u7684\u5de5\u5177\uff0c\u9002\u5408\u4e8e\u5b66\u4e60\u3001\u6d4b\u8bd5\u548c\u5b9e\u9a8cPython\u4ee3\u7801\u3002\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6253\u5f00\u4ea4\u4e92\u6a21\u5f0f\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u5f0f\u6765\u4f7f\u7528Python\u4ea4\u4e92\u6a21\u5f0f\u3002\u65e0\u8bba\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u3001IDE\uff0c\u8fd8\u662f\u5728\u7ebf\u5e73\u53f0\uff0cPython\u4ea4\u4e92\u6a21\u5f0f\u90fd\u80fd\u4e3a\u60a8\u63d0\u4f9b\u4fbf\u6377\u7684\u7f16\u7a0b\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6211\u7684\u8ba1\u7b97\u673a\u4e0a\u6253\u5f00Python\u4ea4\u4e92\u6a21\u5f0f\uff1f<\/strong><br \/>\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u6253\u5f00Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177\uff08\u5982Windows\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u3001macOS\u7684\u7ec8\u7aef\u6216Linux\u7684\u7ec8\u7aef\uff09\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\u547d\u4ee4\u3002\u8fd0\u884c\u8be5\u547d\u4ee4\u540e\uff0c\u60a8\u5c06\u8fdb\u5165Python\u4ea4\u4e92\u5f0f\u73af\u5883\uff0c\u770b\u5230\u7c7b\u4f3c\u4e8e<code>&gt;&gt;&gt;<\/code>\u7684\u63d0\u793a\u7b26\uff0c\u8868\u793a\u60a8\u53ef\u4ee5\u5f00\u59cb\u8f93\u5165Python\u4ee3\u7801\u3002<\/p>\n<p><strong>Python\u4ea4\u4e92\u6a21\u5f0f\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u64cd\u4f5c\uff1f<\/strong><br \/>\u5728Python\u4ea4\u4e92\u6a21\u5f0f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u591a\u79cd\u64cd\u4f5c\uff0c\u5305\u62ec\u53d8\u91cf\u8d4b\u503c\u3001\u51fd\u6570\u5b9a\u4e49\u3001\u5faa\u73af\u548c\u6761\u4ef6\u8bed\u53e5\u7b49\u3002\u5e38\u89c1\u7684\u64cd\u4f5c\u5305\u62ec\u8f93\u5165\u7b80\u5355\u7684\u6570\u5b66\u8868\u8fbe\u5f0f\u8fdb\u884c\u8ba1\u7b97\u3001\u5b9a\u4e49\u548c\u8c03\u7528\u51fd\u6570\u3001\u4ee5\u53ca\u4f7f\u7528<code>import<\/code>\u8bed\u53e5\u5f15\u5165\u5e93\u548c\u6a21\u5757\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u6d4b\u8bd5\u4ee3\u7801\u7247\u6bb5\uff0c\u65b9\u4fbf\u8c03\u8bd5\u548c\u5b66\u4e60\u3002<\/p>\n<p><strong>\u5728Python\u4ea4\u4e92\u6a21\u5f0f\u4e2d\u5982\u4f55\u9000\u51fa\uff1f<\/strong><br \/>\u9000\u51faPython\u4ea4\u4e92\u6a21\u5f0f\u975e\u5e38\u7b80\u5355\u3002\u60a8\u53ef\u4ee5\u8f93\u5165<code>exit()<\/code>\u6216<code>quit()<\/code>\u547d\u4ee4\u6765\u9000\u51fa\u3002\u6b64\u5916\uff0c\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fWindows\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309<code>Ctrl + Z<\/code>\u540e\u6309<code>Enter<\/code>\uff0c\u5728macOS\u6216Linux\u4e0a\u5219\u53ef\u4ee5\u6309<code>Ctrl + D<\/code>\u6765\u7ed3\u675f\u4ea4\u4e92\u4f1a\u8bdd\u3002\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u80fd\u8ba9\u60a8\u5b89\u5168\u5730\u9000\u51fa\u73af\u5883\uff0c\u800c\u4e0d\u4f1a\u5f71\u54cd\u5df2\u5b8c\u6210\u7684\u5de5\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6253\u5f00Python\u4ea4\u4e92\u6a21\u5f0f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3001\u7ec8\u7aef\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7b49\u3002\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u6700\u5e38\u7528 [&hellip;]","protected":false},"author":3,"featured_media":986578,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/986572"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=986572"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/986572\/revisions"}],"predecessor-version":[{"id":986579,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/986572\/revisions\/986579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/986578"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=986572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=986572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=986572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}