{"id":1122498,"date":"2025-01-08T19:21:20","date_gmt":"2025-01-08T11:21:20","guid":{"rendered":""},"modified":"2025-01-08T19:21:23","modified_gmt":"2025-01-08T11:21:23","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86%e5%88%97%e8%a1%a8%e5%8e%bb%e6%8e%89%e4%b8%80%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1122498.html","title":{"rendered":"python\u5982\u4f55\u5c06\u5217\u8868\u53bb\u6389\u4e00\u884c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084326\/95175e7e-8cfb-4167-98b3-480a07acbd7c.webp\" alt=\"python\u5982\u4f55\u5c06\u5217\u8868\u53bb\u6389\u4e00\u884c\" \/><\/p>\n<p><p> <strong>Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5c06\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u884c\uff08\u5143\u7d20\uff09\u53bb\u6389\uff0c\u5305\u62ec\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u5185\u7f6e\u51fd\u6570\u548c\u7b2c\u4e09\u65b9\u5e93\u7b49\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001<code>filter<\/code>\u51fd\u6570\u3001<code>remove<\/code>\u65b9\u6cd5\u3002<\/strong>\u5217\u8868\u63a8\u5bfc\u5f0f\u662f\u4e00\u79cd\u975e\u5e38\u9ad8\u6548\u4e14\u76f4\u89c2\u7684\u65b9\u6cd5\uff0c\u5b83\u80fd\u591f\u6839\u636e\u6761\u4ef6\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u5217\u8868\uff0c\u4ece\u800c\u53bb\u6389\u4e0d\u9700\u8981\u7684\u884c\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5217\u8868\u63a8\u5bfc\u5f0f<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u662fPython\u4e2d\u4e00\u79cd\u7b80\u6d01\u4e14\u9ad8\u6548\u7684\u751f\u6210\u65b0\u5217\u8868\u7684\u65b9\u6cd5\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u4e3a <code>[expression for item in iterable if condition]<\/code>\u3002\u901a\u8fc7\u5217\u8868\u63a8\u5bfc\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u6839\u636e\u67d0\u4e9b\u6761\u4ef6\u6765\u8fc7\u6ee4\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u4ece\u800c\u8fbe\u5230\u53bb\u6389\u7279\u5b9a\u884c\u7684\u76ee\u7684\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u8bed\u6cd5<\/h4>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u7684\u57fa\u672c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">new_list = [item for item in old_list if condition]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>old_list<\/code> \u662f\u539f\u59cb\u5217\u8868\uff0c<code>item<\/code> \u662f\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c<code>condition<\/code> \u662f\u8fc7\u6ee4\u6761\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2. \u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u6574\u6570\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u53bb\u6389\u6240\u6709\u7684\u5076\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]<\/p>\n<p>filtered_numbers = [num for num in numbers if num % 2 != 0]<\/p>\n<p>print(filtered_numbers)  # \u8f93\u51fa: [1, 3, 5, 7, 9]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5217\u8868\u63a8\u5bfc\u5f0f <code>[num for num in numbers if num % 2 != 0]<\/code> \u751f\u6210\u4e86\u4e00\u4e2a\u65b0\u7684\u5217\u8868 <code>filtered_numbers<\/code>\uff0c\u5176\u4e2d\u53ea\u5305\u542b\u539f\u5217\u8868\u4e2d\u7684\u5947\u6570\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001filter\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>filter<\/code>\u51fd\u6570\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u9ad8\u9636\u51fd\u6570\uff0c\u7528\u4e8e\u8fc7\u6ee4\u53ef\u8fed\u4ee3\u5bf9\u8c61\u4e2d\u7684\u5143\u7d20\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u4e3a <code>filter(function, iterable)<\/code>\uff0c\u5176\u4e2d <code>function<\/code> \u662f\u4e00\u4e2a\u8fd4\u56de\u5e03\u5c14\u503c\u7684\u51fd\u6570\uff0c<code>iterable<\/code> \u662f\u8981\u8fc7\u6ee4\u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u8bed\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">filtered_list = filter(function, old_list)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>function<\/code> \u662f\u4e00\u4e2a\u8fd4\u56de\u5e03\u5c14\u503c\u7684\u51fd\u6570\uff0c<code>old_list<\/code> \u662f\u539f\u59cb\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h4>2. \u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u5b57\u7b26\u4e32\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u53bb\u6389\u6240\u6709\u957f\u5ea6\u5c0f\u4e8e3\u7684\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">words = [&quot;apple&quot;, &quot;an&quot;, &quot;banana&quot;, &quot;cat&quot;, &quot;do&quot;]<\/p>\n<p>filtered_words = filter(lambda word: len(word) &gt;= 3, words)<\/p>\n<p>print(list(filtered_words))  # \u8f93\u51fa: [&#39;apple&#39;, &#39;banana&#39;, &#39;cat&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>filter(lambda word: len(word) &gt;= 3, words)<\/code> \u8fd4\u56de\u4e00\u4e2a\u8fc7\u6ee4\u540e\u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\uff0c\u6211\u4eec\u901a\u8fc7 <code>list()<\/code> \u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3a\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001remove\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>remove<\/code>\u65b9\u6cd5\u7528\u4e8e\u4ece\u5217\u8868\u4e2d\u5220\u9664\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u5143\u7d20\u3002\u5982\u679c\u5217\u8868\u4e2d\u6709\u591a\u4e2a\u5339\u914d\u7684\u5143\u7d20\uff0c<code>remove<\/code>\u65b9\u6cd5\u53ea\u4f1a\u5220\u9664\u7b2c\u4e00\u4e2a\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u8bed\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">list.remove(element)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>list<\/code> \u662f\u8981\u64cd\u4f5c\u7684\u5217\u8868\uff0c<code>element<\/code> \u662f\u8981\u5220\u9664\u7684\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>2. \u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u5b57\u7b26\u4e32\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u5220\u9664\u7b2c\u4e00\u4e2a\u51fa\u73b0\u7684\u5b57\u7b26\u4e32 &quot;cat&quot;\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">animals = [&quot;cat&quot;, &quot;dog&quot;, &quot;cat&quot;, &quot;bird&quot;]<\/p>\n<p>animals.remove(&quot;cat&quot;)<\/p>\n<p>print(animals)  # \u8f93\u51fa: [&#39;dog&#39;, &#39;cat&#39;, &#39;bird&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>animals.remove(&quot;cat&quot;)<\/code> \u5220\u9664\u4e86\u5217\u8868\u4e2d\u7b2c\u4e00\u4e2a\u51fa\u73b0\u7684 &quot;cat&quot;\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001del\u8bed\u53e5<\/h3>\n<\/p>\n<p><p><code>del<\/code>\u8bed\u53e5\u7528\u4e8e\u5220\u9664\u5217\u8868\u4e2d\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u5143\u7d20\u3002\u4e0e <code>remove<\/code> \u65b9\u6cd5\u4e0d\u540c\uff0c<code>del<\/code> \u8bed\u53e5\u53ef\u4ee5\u6839\u636e\u7d22\u5f15\u5220\u9664\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u8bed\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">del list[index]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>list<\/code> \u662f\u8981\u64cd\u4f5c\u7684\u5217\u8868\uff0c<code>index<\/code> \u662f\u8981\u5220\u9664\u7684\u5143\u7d20\u7684\u7d22\u5f15\u3002<\/p>\n<\/p>\n<p><h4>2. \u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u6574\u6570\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u5220\u9664\u7d22\u5f15\u4e3a2\u7684\u5143\u7d20\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">numbers = [1, 2, 3, 4, 5]<\/p>\n<p>del numbers[2]<\/p>\n<p>print(numbers)  # \u8f93\u51fa: [1, 2, 4, 5]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>del numbers[2]<\/code> \u5220\u9664\u4e86\u5217\u8868\u4e2d\u7d22\u5f15\u4e3a2\u7684\u5143\u7d20\uff0c\u5373\u6570\u5b573\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001pop\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>pop<\/code>\u65b9\u6cd5\u7528\u4e8e\u5220\u9664\u5217\u8868\u4e2d\u7684\u4e00\u4e2a\u5143\u7d20\uff0c\u5e76\u8fd4\u56de\u8be5\u5143\u7d20\u3002\u4e0e <code>remove<\/code> \u65b9\u6cd5\u4e0d\u540c\uff0c<code>pop<\/code> \u65b9\u6cd5\u662f\u6839\u636e\u7d22\u5f15\u5220\u9664\u5143\u7d20\u7684\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u8bed\u6cd5<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">list.pop(index)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c<code>list<\/code> \u662f\u8981\u64cd\u4f5c\u7684\u5217\u8868\uff0c<code>index<\/code> \u662f\u8981\u5220\u9664\u7684\u5143\u7d20\u7684\u7d22\u5f15\u3002\u5982\u679c\u4e0d\u6307\u5b9a <code>index<\/code>\uff0c<code>pop<\/code> \u65b9\u6cd5\u9ed8\u8ba4\u5220\u9664\u5217\u8868\u4e2d\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>2. \u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u5b57\u7b26\u4e32\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u5220\u9664\u7d22\u5f15\u4e3a1\u7684\u5143\u7d20\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]<\/p>\n<p>removed_fruit = fruits.pop(1)<\/p>\n<p>print(fruits)  # \u8f93\u51fa: [&#39;apple&#39;, &#39;cherry&#39;]<\/p>\n<p>print(removed_fruit)  # \u8f93\u51fa: &#39;banana&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>fruits.pop(1)<\/code> \u5220\u9664\u4e86\u5217\u8868\u4e2d\u7d22\u5f15\u4e3a1\u7684\u5143\u7d20\uff0c\u5e76\u5c06\u5176\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u7b2c\u4e09\u65b9\u5e93pandas<\/h3>\n<\/p>\n<p><p><code>pandas<\/code> \u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5206\u6790\u548c\u5904\u7406\u5e93\uff0c\u5e38\u7528\u4e8e\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u3002<code>pandas<\/code> \u4e2d\u7684 <code>DataFrame<\/code> \u7ed3\u6784\u975e\u5e38\u9002\u5408\u7528\u6765\u8fdb\u884c\u590d\u6742\u7684\u6570\u636e\u64cd\u4f5c\uff0c\u5305\u62ec\u5220\u9664\u884c\u548c\u5217\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5pandas<\/h4>\n<\/p>\n<p><p>\u5728\u4f7f\u7528 <code>pandas<\/code> \u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u5b83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u6570\u636e\u7684\u5217\u8868\uff0c\u6211\u4eec\u5e0c\u671b\u5220\u9664\u67d0\u4e9b\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = {<\/p>\n<p>    &#39;Name&#39;: [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;, &#39;David&#39;],<\/p>\n<p>    &#39;Age&#39;: [24, 27, 22, 32]<\/p>\n<p>}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<p>df = df[df[&#39;Age&#39;] &gt; 25]  # \u5220\u9664\u5e74\u9f84\u5c0f\u4e8e\u7b49\u4e8e25\u7684\u884c<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u521b\u5efa\u4e86\u4e00\u4e2a <code>DataFrame<\/code>\uff0c\u7136\u540e\u901a\u8fc7\u6761\u4ef6\u8fc7\u6ee4\u5220\u9664\u4e86\u5e74\u9f84\u5c0f\u4e8e\u7b49\u4e8e25\u7684\u884c\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u884c\u5220\u9664\uff0c\u5305\u62ec\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001<code>filter<\/code>\u51fd\u6570\u3001<code>remove<\/code>\u65b9\u6cd5\u3001<code>del<\/code>\u8bed\u53e5\u3001<code>pop<\/code>\u65b9\u6cd5\u548c\u7b2c\u4e09\u65b9\u5e93 <code>pandas<\/code>\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u4f7f\u7528\u573a\u666f\u548c\u9700\u6c42\u3002\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u6548\u3001\u7b80\u6d01\u5730\u5220\u9664\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u884c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5220\u9664\u5217\u8868\u7684\u7279\u5b9a\u5143\u7d20\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>remove()<\/code>\u65b9\u6cd5\u4ece\u5217\u8868\u4e2d\u5220\u9664\u7279\u5b9a\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u5217\u8868<code>my_list = [1, 2, 3, 4, 5]<\/code>\uff0c\u60f3\u8981\u5220\u9664\u5143\u7d20<code>3<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528<code>my_list.remove(3)<\/code>\u3002\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u8be5\u5143\u7d20\u5728\u5217\u8868\u4e2d\u5b58\u5728\u591a\u4e2a\u526f\u672c\uff0c<code>remove()<\/code>\u53ea\u4f1a\u5220\u9664\u7b2c\u4e00\u4e2a\u627e\u5230\u7684\u526f\u672c\u3002<\/p>\n<p><strong>\u5982\u4f55\u901a\u8fc7\u7d22\u5f15\u4ecePython\u5217\u8868\u4e2d\u5220\u9664\u5143\u7d20\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>del<\/code>\u8bed\u53e5\u6216<code>pop()<\/code>\u65b9\u6cd5\u6765\u6839\u636e\u7d22\u5f15\u5220\u9664\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a\u5217\u8868<code>my_list = [1, 2, 3, 4, 5]<\/code>\uff0c\u5982\u679c\u60f3\u5220\u9664\u7d22\u5f15\u4e3a<code>2<\/code>\u7684\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528<code>del my_list[2]<\/code>\u6216<code>my_list.pop(2)<\/code>\u3002<code>pop()<\/code>\u65b9\u6cd5\u8fd8\u4f1a\u8fd4\u56de\u88ab\u5220\u9664\u7684\u5143\u7d20\uff0c\u65b9\u4fbf\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u6e05\u7a7a\u6574\u4e2a\u5217\u8868\uff1f<\/strong><br \/>\u5982\u679c\u9700\u8981\u5220\u9664\u5217\u8868\u4e2d\u7684\u6240\u6709\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528<code>clear()<\/code>\u65b9\u6cd5\u3002\u6bd4\u5982\uff0c<code>my_list = [1, 2, 3, 4, 5]<\/code>\uff0c\u8c03\u7528<code>my_list.clear()<\/code>\u540e\uff0c<code>my_list<\/code>\u5c06\u53d8\u6210\u4e00\u4e2a\u7a7a\u5217\u8868<code>[]<\/code>\u3002\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u9002\u5408\u9700\u8981\u91cd\u7f6e\u5217\u8868\u5185\u5bb9\u7684\u573a\u666f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5c06\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u884c\uff08\u5143\u7d20\uff09\u53bb\u6389\uff0c\u5305\u62ec\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u5185\u7f6e\u51fd\u6570\u548c\u7b2c\u4e09\u65b9\u5e93\u7b49\u3002\u6700\u5e38\u89c1\u7684\u65b9 [&hellip;]","protected":false},"author":3,"featured_media":1122505,"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\/1122498"}],"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=1122498"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1122498\/revisions"}],"predecessor-version":[{"id":1122506,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1122498\/revisions\/1122506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1122505"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1122498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1122498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1122498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}