{"id":1130304,"date":"2025-01-08T20:38:30","date_gmt":"2025-01-08T12:38:30","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1130304.html"},"modified":"2025-01-08T20:38:34","modified_gmt":"2025-01-08T12:38:34","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%b0%86%e5%88%97%e8%a1%a8%e4%b8%ad%e7%9a%84%e6%95%b0%e6%9b%b4%e6%94%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1130304.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u5c06\u5217\u8868\u4e2d\u7684\u6570\u66f4\u6539"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100432\/d989b592-5034-4fb7-bb3c-0608d8d24750.webp\" alt=\"python\u4e2d\u5982\u4f55\u5c06\u5217\u8868\u4e2d\u7684\u6570\u66f4\u6539\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u66f4\u6539\u5217\u8868\u4e2d\u7684\u6570\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u4e3b\u8981\u5305\u62ec\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c\u3001\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570map\u7b49\u3002<\/strong> \u5176\u4e2d\uff0c<strong>\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c<\/strong>\u662f\u6700\u7b80\u5355\u76f4\u89c2\u7684\u65b9\u6cd5\uff0c\u5373\u901a\u8fc7\u6307\u5b9a\u5217\u8868\u4e2d\u67d0\u4e2a\u4f4d\u7f6e\u7684\u7d22\u5f15\uff0c\u76f4\u63a5\u5bf9\u5176\u8fdb\u884c\u8d4b\u503c\u64cd\u4f5c\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4ee3\u7801\u793a\u4f8b\u548c\u5b9e\u9645\u5e94\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c<\/h3>\n<\/p>\n<p><p>\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c\u662f\u66f4\u6539\u5217\u8868\u4e2d\u5143\u7d20\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u57fa\u672c\u601d\u60f3\u662f\u901a\u8fc7\u5217\u8868\u7684\u7d22\u5f15\u76f4\u63a5\u8bbf\u95ee\u5e76\u4fee\u6539\u5217\u8868\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>my_list[2] = 10  # \u5c06\u7d22\u5f15\u4e3a2\u7684\u5143\u7d20\u6539\u4e3a10<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [1, 2, 10, 4, 5]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u662f\u4e00\u79cd\u7b80\u6d01\u4e14\u5f3a\u5927\u7684\u65b9\u6cd5\uff0c\u7528\u4e8e\u751f\u6210\u65b0\u5217\u8868\u3002\u901a\u8fc7\u5217\u8868\u63a8\u5bfc\u5f0f\uff0c\u53ef\u4ee5\u6839\u636e\u67d0\u4e9b\u6761\u4ef6\u6216\u8ba1\u7b97\u89c4\u5219\u6279\u91cf\u66f4\u6539\u5217\u8868\u4e2d\u7684\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u5c06\u6240\u6709\u5143\u7d20\u52a01<\/strong><\/h2>\n<p>my_list = [x + 1 for x in my_list]<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [2, 3, 4, 5, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u4e0d\u4ec5\u80fd\u591f\u7b80\u5316\u4ee3\u7801\uff0c\u8fd8\u80fd\u591f\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u8bfb\u6027\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528map\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>map<\/code> \u51fd\u6570\u53ef\u4ee5\u5c06\u6307\u5b9a\u7684\u51fd\u6570\u5e94\u7528\u4e8e\u5217\u8868\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5217\u8868\u3002\u5b83\u975e\u5e38\u9002\u5408\u7528\u4e8e\u6279\u91cf\u4fee\u6539\u5217\u8868\u4e2d\u7684\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u4f7f\u7528map\u51fd\u6570\u5c06\u6240\u6709\u5143\u7d20\u4e58\u4ee52<\/strong><\/h2>\n<p>my_list = list(map(lambda x: x * 2, my_list))<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [2, 4, 6, 8, 10]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528for\u5faa\u73af\u904d\u5386\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u66f4\u590d\u6742\u7684\u4fee\u6539\u64cd\u4f5c\uff0c\u53ef\u4ee5\u4f7f\u7528for\u5faa\u73af\u904d\u5386\u5217\u8868\uff0c\u5e76\u6839\u636e\u6761\u4ef6\u66f4\u6539\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>for i in range(len(my_list)):<\/p>\n<p>    if my_list[i] % 2 == 0:<\/p>\n<p>        my_list[i] = my_list[i] * 2<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [1, 4, 3, 8, 5]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528NumPy\u6570\u7ec4\u8fdb\u884c\u6279\u91cf\u4fee\u6539<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u5904\u7406\u5927\u91cf\u6570\u503c\u6570\u636e\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u4f7f\u7528NumPy\u5e93\u3002NumPy\u6570\u7ec4\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u7ec4\u64cd\u4f5c\u65b9\u6cd5\uff0c\u4f7f\u5f97\u6279\u91cf\u4fee\u6539\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>my_array = np.array([1, 2, 3, 4, 5])<\/p>\n<h2><strong>\u5c06\u6240\u6709\u5143\u7d20\u52a01<\/strong><\/h2>\n<p>my_array += 1<\/p>\n<p>print(my_array)  # \u8f93\u51fa: [2 3 4 5 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u4f7f\u7528Pandas\u8fdb\u884c\u9ad8\u7ea7\u6570\u636e\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u64cd\u4f5c\uff0cPandas\u5e93\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\u3002\u5b83\u4e0d\u4ec5\u63d0\u4f9b\u4e86\u7c7b\u4f3cNumPy\u7684\u9ad8\u6548\u6570\u7ec4\u64cd\u4f5c\uff0c\u8fd8\u63d0\u4f9b\u4e86\u9ad8\u7ea7\u7684\u6570\u636e\u5206\u6790\u548c\u5904\u7406\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>my_series = pd.Series([1, 2, 3, 4, 5])<\/p>\n<h2><strong>\u5c06\u6240\u6709\u5143\u7d20\u4e58\u4ee52<\/strong><\/h2>\n<p>my_series = my_series * 2<\/p>\n<p>print(my_series)  # \u8f93\u51fa: 0 2, 1 4, 2 6, 3 8, 4 10 dtype: int64<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u7ed3\u5408\u6761\u4ef6\u8fdb\u884c\u590d\u6742\u4fee\u6539<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u6839\u636e\u7279\u5b9a\u6761\u4ef6\u4fee\u6539\u5217\u8868\u4e2d\u7684\u5143\u7d20\u3002\u7ed3\u5408\u6761\u4ef6\u8bed\u53e5\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u4fee\u6539\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u5982\u679c\u5143\u7d20\u662f\u5076\u6570\uff0c\u5219\u5c06\u5176\u4e58\u4ee52\uff0c\u5426\u5219\u52a01<\/strong><\/h2>\n<p>my_list = [x * 2 if x % 2 == 0 else x + 1 for x in my_list]<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [2, 4, 4, 8, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u6279\u91cf\u66ff\u6362\u6307\u5b9a\u5143\u7d20<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u6279\u91cf\u66ff\u6362\u5217\u8868\u4e2d\u7684\u67d0\u4e9b\u7279\u5b9a\u5143\u7d20\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u5217\u8868\u63a8\u5bfc\u5f0f\u6216for\u5faa\u73af\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 2, 5]<\/p>\n<h2><strong>\u5c06\u6240\u6709\u76842\u66ff\u6362\u4e3a10<\/strong><\/h2>\n<p>my_list = [10 if x == 2 else x for x in my_list]<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [1, 10, 3, 10, 5]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570replace<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5b57\u7b26\u4e32\u5217\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u5185\u7f6e\u51fd\u6570 <code>replace<\/code> \u8fdb\u884c\u6279\u91cf\u66ff\u6362\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&quot;apple&quot;, &quot;banana&quot;, &quot;apple&quot;, &quot;cherry&quot;]<\/p>\n<h2><strong>\u5c06\u6240\u6709\u7684&#39;apple&#39;\u66ff\u6362\u4e3a&#39;orange&#39;<\/strong><\/h2>\n<p>my_list = [x.replace(&#39;apple&#39;, &#39;orange&#39;) for x in my_list]<\/p>\n<p>print(my_list)  # \u8f93\u51fa: [&#39;orange&#39;, &#39;banana&#39;, &#39;orange&#39;, &#39;cherry&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u3001\u5e94\u7528\u573a\u666f\u4e0e\u5b9e\u9645\u6848\u4f8b<\/h3>\n<\/p>\n<p><p>\u66f4\u6539\u5217\u8868\u4e2d\u7684\u6570\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u975e\u5e38\u5e38\u89c1\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5b9e\u9645\u6848\u4f8b\uff1a<\/p>\n<\/p>\n<p><h4>\u6848\u4f8b\u4e00\uff1a\u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5206\u6790\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u6e05\u6d17\uff0c\u5982\u5c06\u6570\u636e\u4e2d\u7684\u7f3a\u5931\u503c\u6216\u5f02\u5e38\u503c\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h4>\u6848\u4f8b\u4e8c\uff1a\u6279\u91cf\u66f4\u65b0\u6570\u636e\u5e93\u8bb0\u5f55<\/h4>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u4e2d\uff0c\u9700\u8981\u6279\u91cf\u66f4\u65b0\u67d0\u4e9b\u8bb0\u5f55\u7684\u503c\uff0c\u53ef\u4ee5\u5148\u5c06\u6570\u636e\u5bfc\u5165\u5217\u8868\u8fdb\u884c\u5904\u7406\uff0c\u7136\u540e\u518d\u6279\u91cf\u66f4\u65b0\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><h4>\u6848\u4f8b\u4e09\uff1a\u56fe\u50cf\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u56fe\u50cf\u5904\u7406\u9886\u57df\uff0c\u56fe\u50cf\u53ef\u4ee5\u8868\u793a\u4e3a\u4e8c\u7ef4\u6570\u7ec4\uff0c\u901a\u8fc7\u66f4\u6539\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u56fe\u50cf\u7684\u5404\u79cd\u64cd\u4f5c\uff0c\u5982\u6ee4\u6ce2\u3001\u589e\u5f3a\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u66f4\u6539Python\u5217\u8868\u4e2d\u7684\u6570\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u5305\u62ec<strong>\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c<\/strong>\u3001<strong>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f<\/strong>\u3001<strong>\u4f7f\u7528<code>map<\/code>\u51fd\u6570<\/strong>\u3001<strong>for\u5faa\u73af\u904d\u5386\u5217\u8868<\/strong>\u3001<strong>\u4f7f\u7528NumPy\u6570\u7ec4<\/strong>\u3001<strong>\u4f7f\u7528Pandas\u8fdb\u884c\u9ad8\u7ea7\u6570\u636e\u5904\u7406<\/strong>\u3001<strong>\u7ed3\u5408\u6761\u4ef6\u8fdb\u884c\u590d\u6742\u4fee\u6539<\/strong>\u3001<strong>\u6279\u91cf\u66ff\u6362\u6307\u5b9a\u5143\u7d20<\/strong>\u3001<strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570replace<\/strong>\u7b49\u3002\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u5e94\u7528\u573a\u666f\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fee\u6539\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u5143\u7d20\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u7d22\u5f15\u6765\u4fee\u6539\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u5143\u7d20\u3002\u9996\u5148\uff0c\u786e\u5b9a\u8981\u4fee\u6539\u7684\u5143\u7d20\u7684\u7d22\u5f15\u4f4d\u7f6e\uff0c\u7136\u540e\u5c06\u65b0\u7684\u503c\u8d4b\u7ed9\u8be5\u7d22\u5f15\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u5217\u8868<code>my_list = [1, 2, 3, 4]<\/code>\uff0c\u60f3\u8981\u5c06\u7b2c\u4e8c\u4e2a\u5143\u7d20\u6539\u4e3a<code>5<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528<code>my_list[1] = 5<\/code>\uff0c\u8fd9\u6837<code>my_list<\/code>\u5c31\u53d8\u6210\u4e86<code>[1, 5, 3, 4]<\/code>\u3002<\/p>\n<p><strong>Python\u5217\u8868\u4e2d\u7684\u5143\u7d20\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u65b9\u6cd5\u66f4\u6539\uff1f<\/strong><br \/>\u9664\u4e86\u901a\u8fc7\u7d22\u5f15\u76f4\u63a5\u4fee\u6539\u5143\u7d20\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5185\u7f6e\u65b9\u6cd5\u6765\u6539\u53d8\u5217\u8868\u3002\u4f7f\u7528<code>append()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5728\u5217\u8868\u672b\u5c3e\u6dfb\u52a0\u65b0\u5143\u7d20\uff0c<code>insert()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5728\u6307\u5b9a\u7d22\u5f15\u4f4d\u7f6e\u63d2\u5165\u65b0\u5143\u7d20\uff0c<code>remove()<\/code>\u65b9\u6cd5\u53ef\u7528\u4e8e\u5220\u9664\u7279\u5b9a\u503c\u7684\u5143\u7d20\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4e3a\u5217\u8868\u7684\u64cd\u4f5c\u63d0\u4f9b\u4e86\u66f4\u591a\u7075\u6d3b\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u6279\u91cf\u66f4\u6539Python\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff1f<\/strong><br \/>\u5982\u679c\u60f3\u8981\u6279\u91cf\u66f4\u6539\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u6216\u5217\u8868\u63a8\u5bfc\u5f0f\u3002\u5faa\u73af\u5141\u8bb8\u60a8\u9010\u4e2a\u8bbf\u95ee\u548c\u4fee\u6539\u5143\u7d20\uff0c\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">for i in range(len(my_list)):\n    my_list[i] += 1  # \u5c06\u6bcf\u4e2a\u5143\u7d20\u589e\u52a01\n<\/code><\/pre>\n<p>\u53e6\u5916\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5217\u8868\uff0c\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [x + 1 for x in my_list]  # \u5c06\u6bcf\u4e2a\u5143\u7d20\u589e\u52a01\u5e76\u751f\u6210\u65b0\u5217\u8868\n<\/code><\/pre>\n<p>\u8fd9\u4e24\u79cd\u65b9\u5f0f\u90fd\u80fd\u6709\u6548\u5730\u5b9e\u73b0\u6279\u91cf\u66f4\u6539\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u66f4\u6539\u5217\u8868\u4e2d\u7684\u6570\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u4e3b\u8981\u5305\u62ec\u76f4\u63a5\u7d22\u5f15\u8d4b\u503c\u3001\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570map [&hellip;]","protected":false},"author":3,"featured_media":1130311,"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\/1130304"}],"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=1130304"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130304\/revisions"}],"predecessor-version":[{"id":1130313,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130304\/revisions\/1130313"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1130311"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1130304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1130304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1130304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}