{"id":1171544,"date":"2025-01-15T16:36:35","date_gmt":"2025-01-15T08:36:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1171544.html"},"modified":"2025-01-15T16:36:38","modified_gmt":"2025-01-15T08:36:38","slug":"python%e6%89%8b%e6%9c%ba%e7%bc%96%e7%a8%8b%e8%bd%af%e4%bb%b6%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1171544.html","title":{"rendered":"python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u5982\u4f55\u4f7f\u7528"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26073832\/7456ce4f-a956-47dc-aed0-8c34d8380a89.webp\" alt=\"python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u5982\u4f55\u4f7f\u7528\" \/><\/p>\n<p><p> <strong>Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u5982\u4f55\u4f7f\u7528<\/strong><\/p>\n<\/p>\n<p><p><strong>Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u6709\u591a\u79cd\u9009\u62e9\u3001\u6bcf\u79cd\u8f6f\u4ef6\u7684\u4f7f\u7528\u65b9\u6cd5\u90fd\u6709\u6240\u4e0d\u540c\u3001\u9009\u62e9\u5408\u9002\u7684\u7f16\u7a0b\u8f6f\u4ef6\u662f\u5173\u952e\u3002<\/strong> \u5176\u4e2d\u4e00\u79cd\u5e38\u89c1\u7684\u8f6f\u4ef6\u662fPydroid 3\uff0c\u5b83\u662f\u4e00\u6b3e\u9002\u7528\u4e8eAndroid\u8bbe\u5907\u7684Python IDE\u3002Pydroid 3\u7684\u4f7f\u7528\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u4f7f\u7528\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u548c\u5b89\u88c5Pydroid 3<\/strong>\uff1a\u9996\u5148\uff0c\u6253\u5f00Google Play\u5546\u5e97\uff0c\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cPydroid 3\u201d\uff0c\u627e\u5230\u5e94\u7528\u540e\u70b9\u51fb\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u4ee3\u7801<\/strong>\uff1a\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00Pydroid 3\uff0c\u8fdb\u5165\u7f16\u8f91\u5668\u754c\u9762\u3002\u5728\u8fd9\u91cc\u53ef\u4ee5\u7f16\u5199Python\u4ee3\u7801\uff0c\u7f16\u8f91\u5668\u652f\u6301\u8bed\u6cd5\u9ad8\u4eae\u548c\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u4f7f\u7f16\u5199\u4ee3\u7801\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u4ee3\u7801<\/strong>\uff1a\u7f16\u5199\u5b8c\u4ee3\u7801\u540e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u8fd0\u884c\u6309\u94ae\uff0c\u7a0b\u5e8f\u4f1a\u5728\u5185\u7f6e\u7684Python\u89e3\u91ca\u5668\u4e2d\u8fd0\u884c\uff0c\u5e76\u5728\u5c4f\u5e55\u4e0b\u65b9\u663e\u793a\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u8bd5\u548c\u9519\u8bef\u5904\u7406<\/strong>\uff1aPydroid 3\u8fd8\u63d0\u4f9b\u4e86\u8c03\u8bd5\u529f\u80fd\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u3001\u67e5\u770b\u53d8\u91cf\u503c\u7b49\uff0c\u5e2e\u52a9\u67e5\u627e\u548c\u4fee\u6b63\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e00\u3001Pydroid 3\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e<\/h3>\n<\/p>\n<p><p><strong>\u4e0b\u8f7d\u548c\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u4f7f\u7528Pydroid 3\uff0c\u9996\u5148\u9700\u8981\u4eceGoogle Play\u5546\u5e97\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5b83\u3002\u6253\u5f00Google Play\u5546\u5e97\uff0c\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cPydroid 3\u201d\uff0c\u627e\u5230\u540e\u70b9\u51fb\u4e0b\u8f7d\u5b89\u88c5\u3002\u8fd9\u6b3e\u5e94\u7528\u7a0b\u5e8f\u662f\u514d\u8d39\u7684\uff0c\u4f46\u4e5f\u6709\u4ed8\u8d39\u7248\uff0c\u63d0\u4f9b\u66f4\u591a\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><p><strong>\u521d\u6b21\u542f\u52a8\u4e0e\u914d\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u5e94\u7528\u56fe\u6807\u6253\u5f00Pydroid 3\u3002\u521d\u6b21\u542f\u52a8\u65f6\uff0c\u5e94\u7528\u4f1a\u63d0\u793a\u4f60\u4e0b\u8f7d\u4e00\u4e9b\u5fc5\u8981\u7684\u5e93\u548c\u5de5\u5177\uff0c\u786e\u4fdd\u4f60\u7684\u8bbe\u5907\u8fde\u63a5\u5230\u7f51\u7edc\uff0c\u7136\u540e\u6309\u7167\u63d0\u793a\u5b8c\u6210\u4e0b\u8f7d\u548c\u5b89\u88c5\u8fc7\u7a0b\u3002\u8fd9\u4e9b\u5e93\u548c\u5de5\u5177\u5305\u62ecPython\u6807\u51c6\u5e93\u548c\u4e00\u4e9b\u5e38\u7528\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u5982NumPy\u548cMatplotlib\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001Pydroid 3\u7684\u57fa\u672c\u4f7f\u7528<\/h3>\n<\/p>\n<p><p><strong>\u7f16\u5199\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00Pydroid 3\u540e\uff0c\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u7b80\u6d01\u7684\u7f16\u8f91\u5668\u754c\u9762\u3002\u5728\u8fd9\u4e2a\u754c\u9762\u4e2d\uff0c\u4f60\u53ef\u4ee5\u50cf\u5728PC\u4e0a\u7684IDE\u4e00\u6837\u7f16\u5199Python\u4ee3\u7801\u3002\u7f16\u8f91\u5668\u652f\u6301\u8bed\u6cd5\u9ad8\u4eae\u548c\u81ea\u52a8\u8865\u5168\u529f\u80fd\uff0c\u8fd9\u4f7f\u5f97\u7f16\u5199\u4ee3\u7801\u66f4\u52a0\u65b9\u4fbf\u548c\u9ad8\u6548\u3002\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u8f93\u5165\u4ee5\u4e0b\u7b80\u5355\u7684Python\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, Pydroid 3!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd0\u884c\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u7f16\u5199\u5b8c\u4ee3\u7801\u540e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u8fd0\u884c\u6309\u94ae\uff08\u901a\u5e38\u662f\u4e00\u4e2a\u64ad\u653e\u56fe\u6807\uff09\uff0c\u7a0b\u5e8f\u4f1a\u5728\u5185\u7f6e\u7684Python\u89e3\u91ca\u5668\u4e2d\u8fd0\u884c\uff0c\u5e76\u5728\u5c4f\u5e55\u4e0b\u65b9\u7684\u63a7\u5236\u53f0\u7a97\u53e3\u4e2d\u663e\u793a\u8f93\u51fa\u7ed3\u679c\u3002\u4f60\u53ef\u4ee5\u770b\u5230\u201cHello, Pydroid 3!\u201d\u7684\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p><strong>\u8c03\u8bd5\u548c\u9519\u8bef\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>Pydroid 3\u63d0\u4f9b\u4e86\u4e00\u4e9b\u57fa\u672c\u7684\u8c03\u8bd5\u529f\u80fd\uff0c\u4f8b\u5982\u4f60\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\uff0c\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6682\u505c\u6267\u884c\u5e76\u67e5\u770b\u53d8\u91cf\u7684\u503c\u3002\u8fd9\u5bf9\u4e8e\u67e5\u627e\u548c\u4fee\u6b63\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u975e\u5e38\u6709\u5e2e\u52a9\u3002\u8981\u8bbe\u7f6e\u65ad\u70b9\uff0c\u53ea\u9700\u5728\u884c\u53f7\u4e0a\u70b9\u51fb\uff0c\u7136\u540e\u5728\u8fd0\u884c\u65f6\u9009\u62e9\u8c03\u8bd5\u6a21\u5f0f\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5e38\u7528\u529f\u80fd\u4e0e\u6280\u5de7<\/h3>\n<\/p>\n<p><p><strong>\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93<\/strong><\/p>\n<\/p>\n<p><p>Pydroid 3\u5185\u7f6e\u4e86\u4e00\u4e2a\u5305\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\u3002\u70b9\u51fb\u5de6\u4e0a\u89d2\u7684\u83dc\u5355\u6309\u94ae\uff0c\u9009\u62e9\u201cPip\u201d\uff0c\u7136\u540e\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u4f60\u60f3\u5b89\u88c5\u7684\u5e93\u7684\u540d\u79f0\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5b89\u88c5Requests\u5e93\uff0c\u53ea\u9700\u8f93\u5165\u201crequests\u201d\uff0c\u7136\u540e\u70b9\u51fb\u5b89\u88c5\u6309\u94ae\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u4f60\u7684\u4ee3\u7801\u4e2d\u5bfc\u5165\u5e76\u4f7f\u7528\u8fd9\u4e2a\u5e93\u4e86\u3002<\/p>\n<\/p>\n<p><p><strong>\u6587\u4ef6\u7ba1\u7406<\/strong><\/p>\n<\/p>\n<p><p>Pydroid 3\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u4ef6\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u6253\u5f00\u3001\u4fdd\u5b58\u548c\u7ba1\u7406\u4f60\u7684\u4ee3\u7801\u6587\u4ef6\u3002\u70b9\u51fb\u5de6\u4e0a\u89d2\u7684\u83dc\u5355\u6309\u94ae\uff0c\u9009\u62e9\u201c\u6587\u4ef6\u201d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u4e00\u4e2a\u6587\u4ef6\u6d4f\u89c8\u5668\u754c\u9762\u3002\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u65b0\u6587\u4ef6\u3001\u6253\u5f00\u5df2\u6709\u6587\u4ef6\u6216\u8005\u5c06\u6587\u4ef6\u4fdd\u5b58\u5230\u8bbe\u5907\u7684\u5b58\u50a8\u4e2d\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u56fe\u5f62\u754c\u9762<\/strong><\/p>\n<\/p>\n<p><p>Pydroid 3\u4e0d\u4ec5\u652f\u6301\u547d\u4ee4\u884c\u7a0b\u5e8f\uff0c\u8fd8\u652f\u6301\u56fe\u5f62\u754c\u9762\u7a0b\u5e8f\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Tkinter\u3001Kivy\u7b49\u5e93\u6765\u521b\u5efa\u56fe\u5f62\u754c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Tkinter\u521b\u5efa\u7b80\u5355\u7a97\u53e3\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>root.title(&quot;Pydroid 3 GUI&quot;)<\/p>\n<p>label = tk.Label(root, text=&quot;Hello, Pydroid 3!&quot;)<\/p>\n<p>label.pack()<\/p>\n<p>root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5176\u4ed6Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6<\/h3>\n<\/p>\n<p><p>\u9664\u4e86Pydroid 3\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u4f18\u79c0\u7684Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><p><strong>QPython<\/strong><\/p>\n<\/p>\n<p><p>QPython\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684Python\u7f16\u7a0b\u5de5\u5177\uff0c\u9002\u7528\u4e8eAndroid\u8bbe\u5907\u3002\u5b83\u96c6\u6210\u4e86Python\u89e3\u91ca\u5668\u3001\u7f16\u8f91\u5668\u548c\u591a\u79cd\u5b9e\u7528\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5728\u624b\u673a\u4e0a\u8fdb\u884cPython\u7f16\u7a0b\u3002QPython\u652f\u6301Python 2\u548cPython 3\uff0c\u5e76\u4e14\u5185\u7f6e\u4e86\u4e30\u5bcc\u7684\u7b2c\u4e09\u65b9\u5e93\u3002<\/p>\n<\/p>\n<p><p><strong>Pyto<\/strong><\/p>\n<\/p>\n<p><p>Pyto\u662f\u4e00\u6b3e\u9002\u7528\u4e8eiOS\u8bbe\u5907\u7684Python\u7f16\u7a0b\u5de5\u5177\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684Python\u73af\u5883\uff0c\u5305\u62ec\u7f16\u8f91\u5668\u3001\u89e3\u91ca\u5668\u548c\u5305\u7ba1\u7406\u5668\u3002Pyto\u652f\u6301\u591a\u79cd\u7b2c\u4e09\u65b9\u5e93\uff0c\u5e76\u4e14\u53ef\u4ee5\u4e0e\u5176\u4ed6iOS\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<\/p>\n<p><p><strong>AIDE<\/strong><\/p>\n<\/p>\n<p><p>AIDE\u662f\u4e00\u6b3e\u7528\u4e8eAndroid\u8bbe\u5907\u7684\u591a\u8bed\u8a00\u7f16\u7a0b\u5de5\u5177\uff0c\u652f\u6301\u5305\u62ecPython\u5728\u5185\u7684\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002AIDE\u63d0\u4f9b\u4e86\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u8f91\u5668\u548c\u8c03\u8bd5\u5668\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5728\u624b\u673a\u4e0a\u8fdb\u884cPython\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001Python\u7f16\u7a0b\u7684\u57fa\u672c\u77e5\u8bc6<\/h3>\n<\/p>\n<p><p><strong>Python\u8bed\u8a00\u7b80\u4ecb<\/strong><\/p>\n<\/p>\n<p><p>Python\u662f\u4e00\u79cd\u9ad8\u7ea7\u7f16\u7a0b\u8bed\u8a00\uff0c\u5177\u6709\u7b80\u5355\u6613\u5b66\u3001\u529f\u80fd\u5f3a\u5927\u7b49\u7279\u70b9\u3002\u5b83\u5e7f\u6cdb\u5e94\u7528\u4e8eWeb\u5f00\u53d1\u3001\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/tag\/AI\" target=\"_blank\">\u4eba\u5de5\u667a\u80fd<\/a>\u7b49\u9886\u57df\u3002Python\u7684\u8bed\u6cd5\u7b80\u6d01\u660e\u4e86\uff0c\u4ee3\u7801\u53ef\u8bfb\u6027\u9ad8\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u5165\u95e8\u3002<\/p>\n<\/p>\n<p><p><strong>Python\u7684\u57fa\u672c\u8bed\u6cd5<\/strong><\/p>\n<\/p>\n<p><p>Python\u7684\u57fa\u672c\u8bed\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u8bed\u6cd5\u5143\u7d20\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u53d8\u91cf<\/strong>\uff1a\u5728Python\u4e2d\uff0c\u53d8\u91cf\u4e0d\u9700\u8981\u58f0\u660e\u7c7b\u578b\uff0c\u53ef\u4ee5\u76f4\u63a5\u8d4b\u503c\u4f7f\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">x = 10<\/p>\n<p>y = &quot;Hello, Python!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6570\u636e\u7c7b\u578b<\/strong>\uff1aPython\u652f\u6301\u591a\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5305\u62ec\u6574\u6570\u3001\u6d6e\u70b9\u6570\u3001\u5b57\u7b26\u4e32\u3001\u5217\u8868\u3001\u5143\u7ec4\u3001\u5b57\u5178\u7b49\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">num = 42          # \u6574\u6570<\/p>\n<p>pi = 3.14         # \u6d6e\u70b9\u6570<\/p>\n<p>name = &quot;Alice&quot;    # \u5b57\u7b26\u4e32<\/p>\n<p>lst = [1, 2, 3]   # \u5217\u8868<\/p>\n<p>tpl = (4, 5, 6)   # \u5143\u7ec4<\/p>\n<p>dct = {&quot;a&quot;: 1, &quot;b&quot;: 2}  # \u5b57\u5178<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63a7\u5236\u7ed3\u6784<\/strong>\uff1aPython\u652f\u6301\u5e38\u89c1\u7684\u63a7\u5236\u7ed3\u6784\uff0c\u5982\u6761\u4ef6\u8bed\u53e5\u3001\u5faa\u73af\u8bed\u53e5\u7b49\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if x &gt; 0:<\/p>\n<p>    print(&quot;Positive&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;Non-positive&quot;)<\/p>\n<p>for i in range(5):<\/p>\n<p>    print(i)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u51fd\u6570<\/strong>\uff1a\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>def<\/code>\u5173\u952e\u5b57\u5b9a\u4e49\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>result = add(3, 4)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1a7<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p><strong>Python\u7684\u6807\u51c6\u5e93<\/strong><\/p>\n<\/p>\n<p><p>Python\u7684\u6807\u51c6\u5e93\u975e\u5e38\u4e30\u5bcc\uff0c\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u6a21\u5757\u548c\u51fd\u6570\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5b8c\u6210\u5404\u79cd\u4efb\u52a1\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>math<\/strong>\u6a21\u5757\uff1a\u63d0\u4f9b\u4e86\u6570\u5b66\u8fd0\u7b97\u51fd\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import math<\/p>\n<p>print(math.sqrt(16))  # \u8f93\u51fa\uff1a4.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>datetime<\/strong>\u6a21\u5757\uff1a\u63d0\u4f9b\u4e86\u65e5\u671f\u548c\u65f6\u95f4\u5904\u7406\u51fd\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>now = datetime.now()<\/p>\n<p>print(now)  # \u8f93\u51fa\uff1a\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>os<\/strong>\u6a21\u5757\uff1a\u63d0\u4f9b\u4e86\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u7684\u51fd\u6570\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>print(os.getcwd())  # \u8f93\u51fa\uff1a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u516d\u3001Python\u7f16\u7a0b\u7684\u9ad8\u7ea7\u5e94\u7528<\/h3>\n<\/p>\n<p><p><strong>Web\u5f00\u53d1<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728Web\u5f00\u53d1\u9886\u57df\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5e38\u7528\u7684Web\u6846\u67b6\u5305\u62ecDjango\u3001Flask\u7b49\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Flask\u53ef\u4ee5\u5feb\u901f\u642d\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Web\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/&#39;)<\/p>\n<p>def hello():<\/p>\n<p>    return &quot;Hello, Flask!&quot;<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u6570\u636e\u5206\u6790<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u6570\u636e\u5206\u6790\u9886\u57df\u4e5f\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5e38\u7528\u7684\u5e93\u5305\u62ecPandas\u3001NumPy\u3001Matplotlib\u7b49\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Pandas\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u5904\u7406\u548c\u5206\u6790\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = {&#39;Name&#39;: [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;], &#39;Age&#39;: [24, 27, 22]}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong><a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a><\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u673a\u5668\u5b66\u4e60\u9886\u57df\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5e38\u7528\u7684\u5e93\u5305\u62ecScikit-learn\u3001TensorFlow\u3001Keras\u7b49\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Scikit-learn\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u8bad\u7ec3\u548c\u9884\u6d4b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.datasets import load_iris<\/p>\n<p>from sklearn.model_selection import train_test_split<\/p>\n<p>from sklearn.ensemble import RandomForestClassifier<\/p>\n<h2><strong>\u52a0\u8f7d\u6570\u636e\u96c6<\/strong><\/h2>\n<p>iris = load_iris()<\/p>\n<p>X = iris.data<\/p>\n<p>y = iris.target<\/p>\n<h2><strong>\u5212\u5206\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6<\/strong><\/h2>\n<p>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)<\/p>\n<h2><strong>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>clf = RandomForestClassifier()<\/p>\n<p>clf.fit(X_train, y_train)<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = clf.predict(X_test)<\/p>\n<p>print(y_pred)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001Python\u7f16\u7a0b\u7684\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><p><strong>\u4ee3\u7801\u98ce\u683c<\/strong><\/p>\n<\/p>\n<p><p>\u9075\u5faa\u826f\u597d\u7684\u4ee3\u7801\u98ce\u683c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002Python\u7684\u5b98\u65b9\u4ee3\u7801\u98ce\u683c\u6307\u5357\u662fPEP 8\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u4e00\u4e9b\u5e38\u89c1\u7684\u4ee3\u7801\u98ce\u683c\u5efa\u8bae\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6bcf\u884c\u4ee3\u7801\u7684\u957f\u5ea6\u4e0d\u8d85\u8fc779\u4e2a\u5b57\u7b26\u3002<\/li>\n<li>\u4f7f\u75284\u4e2a\u7a7a\u683c\u8fdb\u884c\u7f29\u8fdb\u3002<\/li>\n<li>\u4e3a\u51fd\u6570\u548c\u53d8\u91cf\u9009\u62e9\u6709\u610f\u4e49\u7684\u540d\u79f0\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7248\u672c\u63a7\u5236<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u7248\u672c\u63a7\u5236\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u7ba1\u7406\u4ee3\u7801\u7684\u4e0d\u540c\u7248\u672c\u548c\u534f\u4f5c\u5f00\u53d1\u3002\u5e38\u7528\u7684\u7248\u672c\u63a7\u5236\u5de5\u5177\u5305\u62ecGit\u3001Mercurial\u7b49\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Git\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u4ee3\u7801\u7684\u63d0\u4ea4\u3001\u5206\u652f\u548c\u5408\u5e76\u7b49\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\"># \u521d\u59cb\u5316Git\u4ed3\u5e93<\/p>\n<p>git init<\/p>\n<h2><strong>\u6dfb\u52a0\u6587\u4ef6\u5230\u6682\u5b58\u533a<\/strong><\/h2>\n<p>git add .<\/p>\n<h2><strong>\u63d0\u4ea4\u4ee3\u7801<\/strong><\/h2>\n<p>git commit -m &quot;Initial commit&quot;<\/p>\n<h2><strong>\u521b\u5efa\u65b0\u5206\u652f<\/strong><\/h2>\n<p>git checkout -b new-branch<\/p>\n<h2><strong>\u5408\u5e76\u5206\u652f<\/strong><\/h2>\n<p>git merge new-branch<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u6d4b\u8bd5\u9a71\u52a8\u5f00\u53d1<\/strong><\/p>\n<\/p>\n<p><p>\u6d4b\u8bd5\u9a71\u52a8\u5f00\u53d1\uff08TDD\uff09\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u65b9\u6cd5\uff0c\u5f3a\u8c03\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u7f16\u5199\u4ee3\u7801\u4ee5\u901a\u8fc7\u6d4b\u8bd5\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528unittest\u3001pytest\u7b49\u6d4b\u8bd5\u6846\u67b6\u8fdb\u884c\u5355\u5143\u6d4b\u8bd5\u3002\u4f8b\u5982\uff0c\u4f7f\u7528unittest\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u6d4b\u8bd5\u7528\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import unittest<\/p>\n<p>def add(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>class TestAdd(unittest.TestCase):<\/p>\n<p>    def test_add(self):<\/p>\n<p>        self.assertEqual(add(3, 4), 7)<\/p>\n<p>        self.assertEqual(add(-1, 1), 0)<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    unittest.main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001Python\u7f16\u7a0b\u7684\u5b66\u4e60\u8d44\u6e90<\/h3>\n<\/p>\n<p><p><strong>\u5728\u7ebf\u6559\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u6709\u8bb8\u591a\u4f18\u79c0\u7684\u5728\u7ebf\u6559\u7a0b\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5b66\u4e60Python\u7f16\u7a0b\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.python.org\/3\/\">Python\u5b98\u65b9\u6587\u6863<\/a>: \u63d0\u4f9b\u4e86\u8be6\u7ec6\u7684Python\u8bed\u8a00\u4ecb\u7ecd\u548c\u6807\u51c6\u5e93\u53c2\u8003\u3002<\/li>\n<li><a href=\"https:\/\/www.codecademy.com\/learn\/learn-python-3\">Codecademy<\/a>: \u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u7684Python\u7f16\u7a0b\u8bfe\u7a0b\u3002<\/li>\n<li><a href=\"https:\/\/www.coursera.org\/courses?query=python\">Coursera<\/a>: \u63d0\u4f9b\u4e86\u8bb8\u591a\u7531\u9876\u5c16\u5927\u5b66\u548c\u673a\u6784\u5f00\u8bbe\u7684Python\u7f16\u7a0b\u8bfe\u7a0b\u3002<\/li>\n<\/ul>\n<p><p><strong>\u4e66\u7c4d<\/strong><\/p>\n<\/p>\n<p><p>\u8bb8\u591a\u4f18\u79c0\u7684\u4e66\u7c4d\u53ef\u4ee5\u5e2e\u52a9\u4f60\u6df1\u5165\u5b66\u4e60Python\u7f16\u7a0b\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u300aPython\u7f16\u7a0b\uff1a\u4ece\u5165\u95e8\u5230\u5b9e\u8df5\u300b\uff1a\u4e00\u672c\u9002\u5408\u521d\u5b66\u8005\u7684Python\u7f16\u7a0b\u5165\u95e8\u4e66\u7c4d\uff0c\u5305\u542b\u8bb8\u591a\u5b9e\u7528\u7684\u7f16\u7a0b\u793a\u4f8b\u3002<\/li>\n<li>\u300a\u6d41\u7545\u7684Python\u300b\uff1a\u4e00\u672c\u9002\u5408\u6709\u4e00\u5b9a\u7f16\u7a0b\u57fa\u7840\u7684\u8bfb\u8005\u7684\u9ad8\u7ea7Python\u7f16\u7a0b\u4e66\u7c4d\uff0c\u6df1\u5165\u63a2\u8ba8\u4e86Python\u7684\u9ad8\u7ea7\u7279\u6027\u548c\u6700\u4f73\u5b9e\u8df5\u3002<\/li>\n<li>\u300a\u6df1\u5165\u7406\u89e3Python\u300b\uff1a\u4e00\u672c\u9002\u5408\u5e0c\u671b\u6df1\u5165\u7406\u89e3Python\u8bed\u8a00\u5185\u90e8\u673a\u5236\u7684\u8bfb\u8005\u7684\u4e66\u7c4d\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u4e86Python\u7684\u8fd0\u884c\u65f6\u7cfb\u7edf\u548c\u6027\u80fd\u4f18\u5316\u6280\u5de7\u3002<\/li>\n<\/ul>\n<p><p><strong>\u793e\u533a\u4e0e\u8bba\u575b<\/strong><\/p>\n<\/p>\n<p><p>\u52a0\u5165Python\u793e\u533a\u548c\u8bba\u575b\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4e0e\u5176\u4ed6\u5f00\u53d1\u8005\u4ea4\u6d41\u7ecf\u9a8c\u548c\u89e3\u51b3\u95ee\u9898\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/tagged\/python\">Stack Overflow<\/a>: \u4e00\u4e2a\u8457\u540d\u7684\u7f16\u7a0b\u95ee\u7b54\u7f51\u7ad9\uff0c\u6709\u5927\u91cf\u7684Python\u7f16\u7a0b\u95ee\u9898\u548c\u89e3\u7b54\u3002<\/li>\n<li><a href=\"https:\/\/www.reddit.com\/r\/Python\/\">Reddit<\/a>: \u4e00\u4e2a\u6d3b\u8dc3\u7684Python\u793e\u533a\uff0c\u6709\u8bb8\u591a\u5173\u4e8ePython\u7f16\u7a0b\u7684\u8ba8\u8bba\u548c\u8d44\u6e90\u5206\u4eab\u3002<\/li>\n<li><a href=\"https:\/\/discuss.python.org\/\">Python\u5b98\u65b9\u8bba\u575b<\/a>: Python\u5b98\u65b9\u7684\u8ba8\u8bba\u8bba\u575b\uff0c\u6709\u8bb8\u591a\u5173\u4e8ePython\u8bed\u8a00\u548c\u5f00\u53d1\u7684\u8ba8\u8bba\u548c\u5efa\u8bae\u3002<\/li>\n<\/ul>\n<p><h3>\u4e5d\u3001Python\u7f16\u7a0b\u7684\u672a\u6765\u53d1\u5c55<\/h3>\n<\/p>\n<p><p><strong>\u4eba\u5de5\u667a\u80fd<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u4eba\u5de5\u667a\u80fd\u9886\u57df\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u672a\u6765\u6709\u671b\u5728\u8fd9\u4e00\u9886\u57df\u7ee7\u7eed\u53d1\u5c55\u3002\u968f\u7740\u6df1\u5ea6\u5b66\u4e60\u548c\u673a\u5668\u5b66\u4e60\u6280\u672f\u7684\u4e0d\u65ad\u8fdb\u6b65\uff0cPython\u5c06\u7ee7\u7eed\u6210\u4e3a\u8fd9\u4e00\u9886\u57df\u7684\u4e3b\u8981\u7f16\u7a0b\u8bed\u8a00\u3002\u5e38\u7528\u7684\u4eba\u5de5\u667a\u80fd\u5e93\u5305\u62ecTensorFlow\u3001PyTorch\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u6570\u636e\u79d1\u5b66<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u6570\u636e\u79d1\u5b66\u9886\u57df\u4e5f\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u672a\u6765\u6709\u671b\u5728\u8fd9\u4e00\u9886\u57df\u7ee7\u7eed\u53d1\u5c55\u3002\u968f\u7740\u5927\u6570\u636e\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0cPython\u5c06\u7ee7\u7eed\u6210\u4e3a\u6570\u636e\u79d1\u5b66\u5bb6\u7684\u4e3b\u8981\u5de5\u5177\u3002\u5e38\u7528\u7684\u6570\u636e\u79d1\u5b66\u5e93\u5305\u62ecPandas\u3001NumPy\u3001SciPy\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u7269\u8054\u7f51<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u7269\u8054\u7f51\u9886\u57df\u4e5f\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u672a\u6765\u6709\u671b\u5728\u8fd9\u4e00\u9886\u57df\u7ee7\u7eed\u53d1\u5c55\u3002\u968f\u7740\u7269\u8054\u7f51\u6280\u672f\u7684\u4e0d\u65ad\u666e\u53ca\uff0cPython\u5c06\u7ee7\u7eed\u6210\u4e3a\u7269\u8054\u7f51\u5f00\u53d1\u7684\u91cd\u8981\u5de5\u5177\u3002\u5e38\u7528\u7684\u7269\u8054\u7f51\u5e93\u5305\u62ecMicroPython\u3001CircuitPython\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u91cf\u5b50\u8ba1\u7b97<\/strong><\/p>\n<\/p>\n<p><p>Python\u5728\u91cf\u5b50\u8ba1\u7b97\u9886\u57df\u4e5f\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u672a\u6765\u6709\u671b\u5728\u8fd9\u4e00\u9886\u57df\u7ee7\u7eed\u53d1\u5c55\u3002\u968f\u7740\u91cf\u5b50\u8ba1\u7b97\u6280\u672f\u7684\u4e0d\u65ad\u8fdb\u6b65\uff0cPython\u5c06\u7ee7\u7eed\u6210\u4e3a\u91cf\u5b50\u8ba1\u7b97\u7814\u7a76\u548c\u5f00\u53d1\u7684\u91cd\u8981\u5de5\u5177\u3002\u5e38\u7528\u7684\u91cf\u5b50\u8ba1\u7b97\u5e93\u5305\u62ecQiskit\u3001Cirq\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u8be6\u7ec6\u4e86\u89e3\u4e86Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u4ee5Pydroid 3\u4e3a\u4f8b\uff0c\u8bb2\u89e3\u4e86\u4ece\u4e0b\u8f7d\u3001\u5b89\u88c5\u5230\u7f16\u5199\u4ee3\u7801\u3001\u8fd0\u884c\u4ee3\u7801\u3001\u8c03\u8bd5\u548c\u9519\u8bef\u5904\u7406\u7684\u5168\u8fc7\u7a0b\u3002\u540c\u65f6\uff0c\u6211\u4eec\u8fd8\u4ecb\u7ecd\u4e86\u5176\u4ed6\u51e0\u6b3e\u5e38\u7528\u7684Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\uff0c\u5982QPython\u3001Pyto\u548cAIDE\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u6df1\u5165\u63a2\u8ba8\u4e86Python\u7f16\u7a0b\u7684\u57fa\u672c\u77e5\u8bc6\u3001\u5e38\u7528\u529f\u80fd\u4e0e\u6280\u5de7\u3001\u9ad8\u7ea7\u5e94\u7528\u3001\u6700\u4f73\u5b9e\u8df5\u3001\u5b66\u4e60\u8d44\u6e90\u4ee5\u53ca\u672a\u6765\u53d1\u5c55\u65b9\u5411\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u638c\u63e1Python\u7f16\u7a0b\u6280\u80fd\uff0c\u5e76\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\u53d6\u5f97\u66f4\u597d\u7684\u6210\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u624b\u673a\u4e0a\u5b89\u88c5Python\u7f16\u7a0b\u8f6f\u4ef6\uff1f<\/strong><br \/>\u5728\u624b\u673a\u4e0a\u5b89\u88c5Python\u7f16\u7a0b\u8f6f\u4ef6\u901a\u5e38\u5f88\u7b80\u5355\u3002\u5927\u591a\u6570\u4e3b\u6d41\u7f16\u7a0b\u5e94\u7528\u5728\u5e94\u7528\u5546\u5e97\u4e2d\u90fd\u53ef\u627e\u5230\u3002\u7528\u6237\u53ea\u9700\u5728iOS\u6216Android\u8bbe\u5907\u7684\u5e94\u7528\u5546\u5e97\u4e2d\u641c\u7d22\u201cPython\u7f16\u7a0b\u201d\u6216\u201cPython IDE\u201d\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e94\u7528\u8fdb\u884c\u4e0b\u8f7d\u548c\u5b89\u88c5\u3002\u5e38\u89c1\u7684\u9009\u62e9\u5305\u62ecPydroid 3\u3001QPython\u548cPythonista\uff08\u4ec5\u9650iOS\uff09\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u6253\u5f00\u5e94\u7528\uff0c\u5f00\u59cb\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<p><strong>\u54ea\u4e9bPython\u7f16\u7a0b\u8f6f\u4ef6\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\uff1f<\/strong><br \/>\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u9009\u62e9\u6613\u4e8e\u4f7f\u7528\u4e14\u529f\u80fd\u5f3a\u5927\u7684Python\u7f16\u7a0b\u8f6f\u4ef6\u975e\u5e38\u91cd\u8981\u3002\u63a8\u8350\u4f7f\u7528Pydroid 3\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u53cb\u597d\u7684\u7528\u6237\u754c\u9762\u548c\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u5305\u62ec\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u548c\u793a\u4f8b\u4ee3\u7801\u3002\u6b64\u5916\uff0cQPython\u4e5f\u975e\u5e38\u9002\u5408\u65b0\u624b\uff0c\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u8fd0\u884c\u73af\u5883\u548c\u6587\u6863\u652f\u6301\u3002\u5bf9\u4e8eiOS\u7528\u6237\uff0cPythonista\u662f\u4e00\u6b3e\u529f\u80fd\u5168\u9762\u7684\u9009\u62e9\uff0c\u5305\u542b\u4e86\u5927\u91cf\u7684\u5b66\u4e60\u8d44\u6e90\u3002<\/p>\n<p><strong>\u5728\u624b\u673a\u4e0a\u4f7f\u7528Python\u7f16\u7a0b\u8f6f\u4ef6\u65f6\uff0c\u5982\u4f55\u8c03\u8bd5\u4ee3\u7801\uff1f<\/strong><br \/>\u8c03\u8bd5\u4ee3\u7801\u662f\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e00\u90e8\u5206\u3002\u5927\u591a\u6570Python\u7f16\u7a0b\u8f6f\u4ef6\u90fd\u5185\u7f6e\u4e86\u8c03\u8bd5\u529f\u80fd\u3002\u5728Pydroid 3\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u201cRun\u201d\u6309\u94ae\u76f4\u63a5\u8fd0\u884c\u4ee3\u7801\uff0c\u5e76\u901a\u8fc7\u67e5\u770b\u9519\u8bef\u4fe1\u606f\u6765\u5b9a\u4f4d\u95ee\u9898\u3002QPython\u540c\u6837\u63d0\u4f9b\u4e86\u9519\u8bef\u63d0\u793a\u548c\u8c03\u8bd5\u9009\u9879\uff0c\u5e2e\u52a9\u7528\u6237\u9010\u6b65\u67e5\u627e\u5e76\u4fee\u590d\u9519\u8bef\u3002\u6b64\u5916\uff0c\u8bb8\u591a\u5e94\u7528\u8fd8\u652f\u6301\u5728\u4ee3\u7801\u4e2d\u63d2\u5165\u6253\u5370\u8bed\u53e5\uff0c\u4ee5\u4fbf\u5b9e\u65f6\u67e5\u770b\u53d8\u91cf\u503c\u548c\u7a0b\u5e8f\u6267\u884c\u6d41\u7a0b\uff0c\u8fd9\u5bf9\u8c03\u8bd5\u4e5f\u5927\u6709\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u5982\u4f55\u4f7f\u7528 Python\u624b\u673a\u7f16\u7a0b\u8f6f\u4ef6\u6709\u591a\u79cd\u9009\u62e9\u3001\u6bcf\u79cd\u8f6f\u4ef6\u7684\u4f7f\u7528\u65b9\u6cd5\u90fd\u6709\u6240\u4e0d\u540c\u3001\u9009\u62e9\u5408\u9002\u7684 [&hellip;]","protected":false},"author":3,"featured_media":1171548,"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\/1171544"}],"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=1171544"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1171544\/revisions"}],"predecessor-version":[{"id":1171549,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1171544\/revisions\/1171549"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1171548"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1171544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1171544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1171544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}