{"id":937233,"date":"2024-12-26T19:48:01","date_gmt":"2024-12-26T11:48:01","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937233.html"},"modified":"2024-12-26T19:48:04","modified_gmt":"2024-12-26T11:48:04","slug":"python3%e5%a6%82%e4%bd%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/937233.html","title":{"rendered":"python3\u5982\u4f55"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073146\/a3762325-c5c4-4af7-9899-b983189707cd.webp\" alt=\"python3\u5982\u4f55\" \/><\/p>\n<p><p> Python3 \u662f\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u5b66\u4e60\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\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\u3002<strong>\u5728Python3\u4e2d\uff0c\u7b80\u5355\u6613\u7528\u7684\u8bed\u6cd5\u3001\u4e30\u5bcc\u7684\u6807\u51c6\u5e93\u3001\u8de8\u5e73\u53f0\u7279\u6027\u3001\u5f3a\u5927\u7684\u793e\u533a\u652f\u6301\u662f\u5176\u4e3b\u8981\u4f18\u70b9<\/strong>\u3002\u8fd9\u4e9b\u7279\u6027\u4f7f\u5f97Python3\u6210\u4e3a\u521d\u5b66\u8005\u548c\u4e13\u4e1a\u5f00\u53d1\u8005\u7684\u4f18\u9009\u3002\u9996\u5148\uff0c\u8ba9\u6211\u4eec\u8be6\u7ec6\u63a2\u8ba8Python3\u7684\u7b80\u5355\u6613\u7528\u7684\u8bed\u6cd5\u3002<\/p>\n<\/p>\n<p><p>Python3\u7684\u8bed\u6cd5\u76f8\u5bf9\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u66f4\u52a0\u76f4\u89c2\u548c\u7b80\u6d01\uff0c\u4f7f\u7528\u7f29\u8fdb\u6765\u8868\u793a\u4ee3\u7801\u5757\uff0c\u800c\u4e0d\u662f\u4f7f\u7528\u62ec\u53f7\u6216\u5173\u952e\u8bcd\u3002\u8fd9\u79cd\u8bbe\u8ba1\u4e0d\u4ec5\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u8fd8\u51cf\u5c11\u4e86\u7f16\u5199\u4ee3\u7801\u65f6\u7684\u51fa\u9519\u673a\u4f1a\u3002Python3\u901a\u8fc7\u4f7f\u7528\u7b80\u5355\u660e\u4e86\u7684\u8bed\u6cd5\uff0c\u5927\u5927\u964d\u4f4e\u4e86\u7f16\u7a0b\u7684\u95e8\u69db\uff0c\u4f7f\u5f97\u5b66\u4e60\u7f16\u7a0b\u548c\u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8Python3\u7684\u5176\u4ed6\u7279\u6027\u53ca\u5176\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001PYTHON3 \u7684\u7b80\u5355\u6613\u7528\u7684\u8bed\u6cd5<\/h3>\n<\/p>\n<p><p>Python3\u7684\u8bed\u6cd5\u8bbe\u8ba1\u5f3a\u8c03\u53ef\u8bfb\u6027\u548c\u7b80\u6d01\u6027\uff0c\u8fd9\u4f7f\u5f97\u5b83\u6210\u4e3a\u521d\u5b66\u8005\u548c\u4e13\u5bb6\u90fd\u559c\u6b22\u7684\u8bed\u8a00\u3002<\/p>\n<\/p>\n<p><h4>1.1\u3001\u7f29\u8fdb\u4e0e\u4ee3\u7801\u5757<\/h4>\n<\/p>\n<p><p>Python3\u91c7\u7528\u7f29\u8fdb\u6765\u5b9a\u4e49\u4ee3\u7801\u5757\uff0c\u800c\u4e0d\u662f\u4f7f\u7528\u5927\u62ec\u53f7\u6216\u5173\u952e\u8bcd\u3002\u8fd9\u79cd\u8bbe\u8ba1\u4e0d\u4ec5\u4f7f\u4ee3\u7801\u770b\u8d77\u6765\u66f4\u6574\u6d01\uff0c\u800c\u4e14\u5f3a\u5236\u5f00\u53d1\u8005\u7f16\u5199\u51fa\u66f4\u6613\u4e8e\u7ef4\u62a4\u7684\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def greet(name):<\/p>\n<p>    if name:<\/p>\n<p>        print(f&quot;Hello, {name}!&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u7f29\u8fdb\u660e\u663e\u5730\u663e\u793a\u4e86\u6761\u4ef6\u8bed\u53e5\u548c\u51fd\u6570\u4f53\u7684\u8303\u56f4\u3002<\/p>\n<\/p>\n<p><h4>1.2\u3001\u4e30\u5bcc\u7684\u5185\u5efa\u51fd\u6570<\/h4>\n<\/p>\n<p><p>Python3\u63d0\u4f9b\u4e86\u5927\u91cf\u5185\u5efa\u51fd\u6570\uff0c\u7b80\u5316\u4e86\u8bb8\u591a\u5e38\u89c1\u7684\u4efb\u52a1\u3002\u4f8b\u5982\uff0c<code>print()<\/code>\u51fd\u6570\u7528\u4e8e\u8f93\u51fa\uff0c<code>len()<\/code>\u51fd\u6570\u7528\u4e8e\u8ba1\u7b97\u957f\u5ea6\uff0c<code>sum()<\/code>\u51fd\u6570\u7528\u4e8e\u6c42\u548c\u7b49\u3002\u8fd9\u4e9b\u51fd\u6570\u5927\u5927\u7b80\u5316\u4e86\u7f16\u7a0b\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5]<\/p>\n<p>print(sum(numbers))  # \u8f93\u51fa 15<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e30\u5bcc\u7684\u6807\u51c6\u5e93<\/h3>\n<\/p>\n<p><p>Python3\u62e5\u6709\u4e00\u4e2a\u5e9e\u5927\u7684\u6807\u51c6\u5e93\uff0c\u63d0\u4f9b\u4e86\u5904\u7406\u5404\u79cd\u4efb\u52a1\u7684\u6a21\u5757\u548c\u5305\u3002<\/p>\n<\/p>\n<p><h4>2.1\u3001\u6570\u636e\u5904\u7406<\/h4>\n<\/p>\n<p><p>Python3\u7684\u6807\u51c6\u5e93\u4e2d\u5305\u542b\u8bb8\u591a\u7528\u4e8e\u6570\u636e\u5904\u7406\u7684\u6a21\u5757\uff0c\u5982<code>csv<\/code>\u3001<code>json<\/code>\u3001<code>xml.etree.ElementTree<\/code>\u7b49\u3002\u8fd9\u4e9b\u6a21\u5757\u4f7f\u5f97\u5904\u7406\u4e0d\u540c\u683c\u5f0f\u7684\u6570\u636e\u53d8\u5f97\u975e\u5e38\u7b80\u5355\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<p>data = &#39;{&quot;name&quot;: &quot;John&quot;, &quot;age&quot;: 30}&#39;<\/p>\n<p>parsed_data = json.loads(data)<\/p>\n<p>print(parsed_data[&#39;name&#39;])  # \u8f93\u51fa John<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.2\u3001\u6587\u4ef6\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3<\/h4>\n<\/p>\n<p><p>Python3\u7684<code>os<\/code>\u548c<code>sys<\/code>\u6a21\u5757\u5141\u8bb8\u7a0b\u5e8f\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\uff0c\u6267\u884c\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u64cd\u4f5c\u3001\u5904\u7406\u7cfb\u7edf\u7ea7\u53c2\u6570\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>current_directory = os.getcwd()<\/p>\n<p>print(current_directory)  # \u8f93\u51fa\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u8de8\u5e73\u53f0\u7279\u6027<\/h3>\n<\/p>\n<p><p>Python3\u662f\u8de8\u5e73\u53f0\u7684\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u80fd\u591f\u5728\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\uff0c\u5982Windows\u3001macOS\u548cLinux\u3002<\/p>\n<\/p>\n<p><h4>3.1\u3001\u4ee3\u7801\u79fb\u690d\u6027<\/h4>\n<\/p>\n<p><p>\u7531\u4e8ePython3\u7684\u8de8\u5e73\u53f0\u7279\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u7f16\u5199\u4e00\u6b21\u4ee3\u7801\uff0c\u7136\u540e\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\uff0c\u800c\u4e0d\u9700\u8981\u5bf9\u4ee3\u7801\u8fdb\u884c\u5927\u91cf\u4fee\u6539\u3002\u8fd9\u5927\u5927\u51cf\u5c11\u4e86\u5f00\u53d1\u548c\u7ef4\u62a4\u7684\u5de5\u4f5c\u91cf\u3002<\/p>\n<\/p>\n<p><h4>3.2\u3001\u5305\u7ba1\u7406\u548c\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>Python3\u63d0\u4f9b\u4e86<code>pip<\/code>\u5de5\u5177\uff0c\u7528\u4e8e\u7ba1\u7406\u548c\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\u3002\u6b64\u5916\uff0c<code>venv<\/code>\u6a21\u5757\u5141\u8bb8\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u4f7f\u5f97\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u9694\u79bb\uff0c\u907f\u514d\u7248\u672c\u51b2\u7a81\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\"># \u521b\u5efa\u865a\u62df\u73af\u5883<\/p>\n<p>python3 -m venv myenv<\/p>\n<h2><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><\/h2>\n<p>source myenv\/bin\/activate  # On macOS\/Linux<\/p>\n<p>myenv\\Scripts\\activate  # On Windows<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5f3a\u5927\u7684\u793e\u533a\u652f\u6301<\/h3>\n<\/p>\n<p><p>Python3\u62e5\u6709\u4e00\u4e2a\u5e9e\u5927\u4e14\u6d3b\u8dc3\u7684\u793e\u533a\uff0c\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u8d44\u6e90\u548c\u652f\u6301\u3002<\/p>\n<\/p>\n<p><h4>4.1\u3001\u5f00\u6e90\u9879\u76ee\u548c\u5e93<\/h4>\n<\/p>\n<p><p>Python3\u7684\u793e\u533a\u5f00\u53d1\u4e86\u6570\u4ee5\u5343\u8ba1\u7684\u5f00\u6e90\u9879\u76ee\u548c\u5e93\uff0c\u6db5\u76d6\u4e86\u4eceWeb\u5f00\u53d1\u5230\u6570\u636e\u79d1\u5b66\u7684\u5404\u4e2a\u9886\u57df\u3002\u4f8b\u5982\uff0cDjango\u548cFlask\u662f\u7528\u4e8eWeb\u5f00\u53d1\u7684\u6d41\u884c\u6846\u67b6\uff0cNumPy\u548cPandas\u662f\u6570\u636e\u5206\u6790\u7684\u5fc5\u5907\u5e93\u3002<\/p>\n<\/p>\n<p><h4>4.2\u3001\u4e30\u5bcc\u7684\u5b66\u4e60\u8d44\u6e90<\/h4>\n<\/p>\n<p><p>Python3\u7684\u793e\u533a\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u5b66\u4e60\u8d44\u6e90\uff0c\u5305\u62ec\u5b98\u65b9\u6587\u6863\u3001\u5728\u7ebf\u6559\u7a0b\u3001\u8bba\u575b\u548c\u4e66\u7c4d\u3002\u8fd9\u4e9b\u8d44\u6e90\u4e3a\u521d\u5b66\u8005\u548c\u9ad8\u7ea7\u7528\u6237\u63d0\u4f9b\u4e86\u5168\u9762\u7684\u5b66\u4e60\u652f\u6301\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5e94\u7528\u9886\u57df<\/h3>\n<\/p>\n<p><p>Python3\u5728\u8bb8\u591a\u9886\u57df\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5176\u4e2d\u5305\u62ecWeb\u5f00\u53d1\u3001\u6570\u636e\u5206\u6790\u3001\u4eba\u5de5\u667a\u80fd\u3001\u79d1\u5b66\u8ba1\u7b97\u7b49\u3002<\/p>\n<\/p>\n<p><h4>5.1\u3001Web\u5f00\u53d1<\/h4>\n<\/p>\n<p><p>Python3\u7684\u6846\u67b6\u5982Django\u548cFlask\u4f7fWeb\u5f00\u53d1\u53d8\u5f97\u7b80\u5355\u800c\u9ad8\u6548\u3002\u8fd9\u4e9b\u6846\u67b6\u63d0\u4f9b\u4e86\u8bb8\u591a\u529f\u80fd\uff0c\u4f8b\u5982\u8def\u7531\u3001\u6a21\u677f\u5f15\u64ce\u3001ORM\u7b49\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u548c\u90e8\u7f72Web\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h4>5.2\u3001\u6570\u636e\u5206\u6790\u4e0e\u79d1\u5b66\u8ba1\u7b97<\/h4>\n<\/p>\n<p><p>Python3\u7684\u5e93\u5982NumPy\u3001Pandas\u3001Matplotlib\u7b49\u662f\u6570\u636e\u5206\u6790\u548c\u79d1\u5b66\u8ba1\u7b97\u7684\u5229\u5668\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u7528\u4e8e\u5904\u7406\u548c\u5206\u6790\u5927\u91cf\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = {&#39;Name&#39;: [&#39;John&#39;, &#39;Anna&#39;, &#39;Peter&#39;], &#39;Age&#39;: [28, 24, 35]}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5.3\u3001\u4eba\u5de5\u667a\u80fd\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a><\/h4>\n<\/p>\n<p><p>Python3\u5728\u4eba\u5de5\u667a\u80fd\u548c\u673a\u5668\u5b66\u4e60\u9886\u57df\u4e5f\u5177\u6709\u91cd\u8981\u5730\u4f4d\u3002\u5e93\u5982TensorFlow\u3001Keras\u3001Scikit-learn\u7b49\u4e3a\u5f00\u53d1\u548c\u8bad\u7ec3\u673a\u5668\u5b66\u4e60\u6a21\u578b\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.linear_model import LinearRegression<\/p>\n<h2><strong>\u5047\u8bbe\u5df2\u51c6\u5907\u597d\u6570\u636eX\u548cy<\/strong><\/h2>\n<p>model = LinearRegression()<\/p>\n<p>model.fit(X, y)<\/p>\n<p>predictions = model.predict(X_test)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u672a\u6765\u5c55\u671b<\/h3>\n<\/p>\n<p><p>\u968f\u7740\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0cPython3\u7684\u5e94\u7528\u9886\u57df\u5c06\u8fdb\u4e00\u6b65\u6269\u5c55\uff0c\u7279\u522b\u662f\u5728\u4eba\u5de5\u667a\u80fd\u3001\u7269\u8054\u7f51\u7b49\u65b0\u5174\u9886\u57df\u3002<\/p>\n<\/p>\n<p><h4>6.1\u3001\u6301\u7eed\u7684\u8bed\u8a00\u6539\u8fdb<\/h4>\n<\/p>\n<p><p>Python3\u7684\u5f00\u53d1\u8005\u793e\u533a\u4e0d\u65ad\u6539\u8fdb\u548c\u4f18\u5316\u8bed\u8a00\u7279\u6027\uff0c\u786e\u4fdd\u5176\u5728\u6027\u80fd\u548c\u529f\u80fd\u4e0a\u7684\u9886\u5148\u5730\u4f4d\u3002\u5b9a\u671f\u7684\u7248\u672c\u66f4\u65b0\u5e26\u6765\u4e86\u65b0\u7684\u7279\u6027\u548c\u66f4\u597d\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h4>6.2\u3001\u5e7f\u6cdb\u7684\u4f01\u4e1a\u91c7\u7528<\/h4>\n<\/p>\n<p><p>\u8d8a\u6765\u8d8a\u591a\u7684\u4f01\u4e1a\u9009\u62e9Python3\u6765\u6784\u5efa\u5176\u6838\u5fc3\u5e94\u7528\uff0c\u8fd9\u4e5f\u63a8\u52a8\u4e86\u8bed\u8a00\u7684\u4e0d\u65ad\u53d1\u5c55\u548c\u6539\u8fdb\u3002\u4f01\u4e1a\u7684\u91c7\u7528\u4e0d\u4ec5\u589e\u52a0\u4e86\u5bf9Python3\u4e13\u4e1a\u4eba\u624d\u7684\u9700\u6c42\uff0c\u4e5f\u4fc3\u8fdb\u4e86\u5176\u751f\u6001\u7cfb\u7edf\u7684\u7e41\u8363\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u4eec\u6df1\u5165\u4e86\u89e3\u4e86Python3\u7684\u4f18\u70b9\u3001\u7279\u6027\u53ca\u5176\u5728\u4e0d\u540c\u9886\u57df\u7684\u5e94\u7528\u3002Python3\u4e0d\u4ec5\u662f\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u800c\u4e14\u56e0\u5176\u6613\u7528\u6027\u548c\u5e7f\u6cdb\u7684\u5e94\u7528\u800c\u5907\u53d7\u6b22\u8fce\u3002\u65e0\u8bba\u4f60\u662f\u521a\u5f00\u59cb\u5b66\u4e60\u7f16\u7a0b\u7684\u521d\u5b66\u8005\uff0c\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0cPython3\u90fd\u80fd\u4e3a\u4f60\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\u548c\u65e0\u9650\u7684\u53ef\u80fd\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5f00\u59cb\u5b66\u4e60Python3\uff1f<\/strong><br \/>\u5b66\u4e60Python3\u7684\u7b2c\u4e00\u6b65\u662f\u9009\u62e9\u5408\u9002\u7684\u5b66\u4e60\u8d44\u6e90\u3002\u53ef\u4ee5\u8003\u8651\u5728\u7ebf\u8bfe\u7a0b\u3001\u4e66\u7c4d\u6216\u89c6\u9891\u6559\u7a0b\u7b49\u591a\u79cd\u5f62\u5f0f\u3002\u63a8\u8350\u4e00\u4e9b\u77e5\u540d\u7684\u5728\u7ebf\u5b66\u4e60\u5e73\u53f0\uff0c\u5982Coursera\u3001edX\u548cCodecademy\uff0c\u8fd9\u4e9b\u5e73\u53f0\u63d0\u4f9b\u7cfb\u7edf\u7684\u8bfe\u7a0b\u5b89\u6392\u548c\u9879\u76ee\u5b9e\u8df5\u3002\u6b64\u5916\uff0c\u53c2\u4e0e\u7f16\u7a0b\u793e\u533a\u5982Stack Overflow\u6216GitHub\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u89e3\u51b3\u5b66\u4e60\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u95ee\u9898\u5e76\u83b7\u5f97\u5b9e\u8df5\u7ecf\u9a8c\u3002<\/p>\n<p><strong>Python3\u7684\u5e38\u89c1\u5e94\u7528\u9886\u57df\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>Python3\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u591a\u4e2a\u9886\u57df\uff0c\u5305\u62ec\u6570\u636e\u79d1\u5b66\u3001\u4eba\u5de5\u667a\u80fd\u3001Web\u5f00\u53d1\u3001\u81ea\u52a8\u5316\u811a\u672c\u548c\u6e38\u620f\u5f00\u53d1\u7b49\u3002\u5728\u6570\u636e\u79d1\u5b66\u9886\u57df\uff0cPython\u7684\u5e93\u5982Pandas\u548cNumPy\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u80fd\u529b\uff1b\u5728\u4eba\u5de5\u667a\u80fd\u65b9\u9762\uff0cTensorFlow\u548cPyTorch\u5219\u662f\u70ed\u95e8\u7684\u6df1\u5ea6\u5b66\u4e60\u6846\u67b6\u3002\u800c\u5728Web\u5f00\u53d1\u4e2d\uff0cFlask\u548cDjango\u662f\u6d41\u884c\u7684Python\u6846\u67b6\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5feb\u901f\u6784\u5efa\u7f51\u7ad9\u548c\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p><strong>\u5982\u4f55\u8c03\u8bd5Python3\u4ee3\u7801\uff1f<\/strong><br \/>\u8c03\u8bd5Python3\u4ee3\u7801\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528print\u8bed\u53e5\u8f93\u51fa\u53d8\u91cf\u503c\u4ee5\u89c2\u5bdf\u7a0b\u5e8f\u6d41\u7a0b\uff1b\u5229\u7528Python\u5185\u7f6e\u7684pdb\u6a21\u5757\u8fdb\u884c\u9010\u6b65\u8c03\u8bd5\uff0c\u5141\u8bb8\u4f60\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\uff1b\u6b64\u5916\uff0c\u8bb8\u591a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u5982PyCharm\u548cVisual Studio Code\u63d0\u4f9b\u4e86\u56fe\u5f62\u5316\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u67e5\u770b\u53d8\u91cf\u3001\u8c03\u7528\u6808\u548c\u6267\u884c\u6d41\u7a0b\uff0c\u5e2e\u52a9\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python3 \u662f\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u5b66\u4e60\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8eWeb\u5f00\u53d1\u3001\u6570\u636e\u5206\u6790\u3001\u4eba\u5de5\u667a\u80fd\u7b49\u9886\u57df\u3002\u5728Pyth [&hellip;]","protected":false},"author":3,"featured_media":937238,"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\/937233"}],"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=937233"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937233\/revisions"}],"predecessor-version":[{"id":937239,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937233\/revisions\/937239"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/937238"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=937233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=937233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=937233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}