{"id":1041723,"date":"2024-12-31T12:51:34","date_gmt":"2024-12-31T04:51:34","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1041723.html"},"modified":"2024-12-31T12:51:36","modified_gmt":"2024-12-31T04:51:36","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8b%e5%88%97%e8%a1%a8%e4%b8%ad%e9%87%8d%e5%a4%8d%e6%95%b0%e6%8d%aepython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1041723.html","title":{"rendered":"\u5982\u4f55\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636epython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/1aed8c6c-25c6-4fdf-998e-7a021d3fb8d4.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636epython\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636ePython<\/strong><\/p>\n<\/p>\n<p><p><strong>\u5728Python\u4e2d\u67e5\u770b\u5217\u8868\u4e2d\u7684\u91cd\u590d\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528Counter\u6a21\u5757\u3001\u96c6\u5408\u64cd\u4f5c\u3001\u5217\u8868\u89e3\u6790\u7b49\u65b9\u6cd5<\/strong>\uff0c\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Counter\u6a21\u5757\u6765\u67e5\u770b\u5217\u8868\u4e2d\u7684\u91cd\u590d\u6570\u636e\u3002\u901a\u8fc7Counter\uff0c\u6211\u4eec\u53ef\u4ee5\u8ba1\u7b97\u5217\u8868\u4e2d\u6bcf\u4e2a\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u7136\u540e\u7b5b\u9009\u51fa\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\u7684\u5143\u7d20\u4f5c\u4e3a\u91cd\u590d\u6570\u636e\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528Counter\u6a21\u5757\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636e\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import Counter<\/p>\n<p>def find_duplicates(input_list):<\/p>\n<p>    # \u4f7f\u7528Counter\u8ba1\u7b97\u6bcf\u4e2a\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570<\/p>\n<p>    element_counts = Counter(input_list)<\/p>\n<p>    # \u7b5b\u9009\u51fa\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\u7684\u5143\u7d20<\/p>\n<p>    duplicates = [element for element, count in element_counts.items() if count &gt; 1]<\/p>\n<p>    return duplicates<\/p>\n<h2><strong>\u793a\u4f8b\u5217\u8868<\/strong><\/h2>\n<p>sample_list = [1, 2, 3, 4, 2, 3, 5, 6, 3, 7, 8, 9, 2]<\/p>\n<h2><strong>\u67e5\u627e\u91cd\u590d\u6570\u636e<\/strong><\/h2>\n<p>duplicate_elements = find_duplicates(sample_list)<\/p>\n<p>print(&quot;\u91cd\u590d\u6570\u636e:&quot;, duplicate_elements)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5bfc\u5165\u4e86Counter\u6a21\u5757\uff0c\u7136\u540e\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3afind_duplicates\u7684\u51fd\u6570\u3002\u8be5\u51fd\u6570\u63a5\u53d7\u4e00\u4e2a\u5217\u8868\u4f5c\u4e3a\u8f93\u5165\uff0c\u5e76\u4f7f\u7528Counter\u8ba1\u7b97\u6bcf\u4e2a\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570\u3002\u63a5\u7740\uff0c\u6211\u4eec\u901a\u8fc7\u5217\u8868\u89e3\u6790\u7b5b\u9009\u51fa\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\u7684\u5143\u7d20\uff0c\u6700\u540e\u8fd4\u56de\u8fd9\u4e9b\u91cd\u590d\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Counter\u6a21\u5757<\/h3>\n<\/p>\n<p><p>Counter\u6a21\u5757\u662fcollections\u5e93\u4e2d\u7684\u4e00\u4e2a\u7c7b\uff0c\u5b83\u7528\u4e8e\u7edf\u8ba1\u53ef\u8fed\u4ee3\u5bf9\u8c61\u4e2d\u5143\u7d20\u7684\u9891\u6b21\u3002\u901a\u8fc7\u4f7f\u7528Counter\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u627e\u5230\u5217\u8868\u4e2d\u6bcf\u4e2a\u5143\u7d20\u51fa\u73b0\u7684\u6b21\u6570\uff0c\u5e76\u7b5b\u9009\u51fa\u91cd\u590d\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import Counter<\/p>\n<p>def find_duplicates(input_list):<\/p>\n<p>    element_counts = Counter(input_list)<\/p>\n<p>    duplicates = [element for element, count in element_counts.items() if count &gt; 1]<\/p>\n<p>    return duplicates<\/p>\n<p>sample_list = [1, 2, 3, 4, 2, 3, 5, 6, 3, 7, 8, 9, 2]<\/p>\n<p>duplicate_elements = find_duplicates(sample_list)<\/p>\n<p>print(&quot;\u91cd\u590d\u6570\u636e:&quot;, duplicate_elements)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0cCounter(input_list)\u4f1a\u8fd4\u56de\u4e00\u4e2a\u5b57\u5178\uff0c\u5176\u4e2d\u952e\u662f\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u503c\u662f\u8fd9\u4e9b\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570\u3002\u901a\u8fc7\u5217\u8868\u89e3\u6790\uff0c\u6211\u4eec\u7b5b\u9009\u51fa\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\u7684\u5143\u7d20\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u91cd\u590d\u6570\u636e\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u96c6\u5408\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u96c6\u5408\uff08set\uff09\u662fPython\u4e2d\u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u5b83\u4e0d\u5141\u8bb8\u91cd\u590d\u5143\u7d20\u3002\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u96c6\u5408\u7684\u8fd9\u4e00\u7279\u6027\uff0c\u901a\u8fc7\u96c6\u5408\u64cd\u4f5c\u6765\u67e5\u627e\u5217\u8868\u4e2d\u7684\u91cd\u590d\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">def find_duplicates(input_list):<\/p>\n<p>    seen = set()<\/p>\n<p>    duplicates = set()<\/p>\n<p>    for element in input_list:<\/p>\n<p>        if element in seen:<\/p>\n<p>            duplicates.add(element)<\/p>\n<p>        else:<\/p>\n<p>            seen.add(element)<\/p>\n<p>    return list(duplicates)<\/p>\n<p>sample_list = [1, 2, 3, 4, 2, 3, 5, 6, 3, 7, 8, 9, 2]<\/p>\n<p>duplicate_elements = find_duplicates(sample_list)<\/p>\n<p>print(&quot;\u91cd\u590d\u6570\u636e:&quot;, duplicate_elements)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e24\u4e2a\u96c6\u5408\uff1aseen\u548cduplicates\u3002\u904d\u5386\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u65f6\uff0c\u5982\u679c\u8be5\u5143\u7d20\u5df2\u7ecf\u5728seen\u4e2d\uff0c\u5219\u5c06\u5176\u6dfb\u52a0\u5230duplicates\u96c6\u5408\u4e2d\uff1b\u5426\u5219\uff0c\u5c06\u5176\u6dfb\u52a0\u5230seen\u96c6\u5408\u4e2d\u3002\u6700\u540e\uff0c\u6211\u4eec\u5c06duplicates\u96c6\u5408\u8f6c\u6362\u4e3a\u5217\u8868\u5e76\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u5217\u8868\u89e3\u6790<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u89e3\u6790\uff08list comprehension\uff09\u662f\u4e00\u79cd\u7b80\u6d01\u7684\u521b\u5efa\u5217\u8868\u7684\u65b9\u5f0f\u3002\u5728\u67e5\u627e\u91cd\u590d\u6570\u636e\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u7ed3\u5408\u5217\u8868\u89e3\u6790\u548c\u5185\u7f6e\u7684count\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">def find_duplicates(input_list):<\/p>\n<p>    return list(set([element for element in input_list if input_list.count(element) &gt; 1]))<\/p>\n<p>sample_list = [1, 2, 3, 4, 2, 3, 5, 6, 3, 7, 8, 9, 2]<\/p>\n<p>duplicate_elements = find_duplicates(sample_list)<\/p>\n<p>print(&quot;\u91cd\u590d\u6570\u636e:&quot;, duplicate_elements)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5217\u8868\u89e3\u6790\u904d\u5386\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\uff0c\u5e76\u901a\u8fc7input_list.count(element)\u8ba1\u7b97\u8be5\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570\u3002\u5982\u679c\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\uff0c\u5219\u5c06\u5176\u6dfb\u52a0\u5230\u4e00\u4e2a\u65b0\u7684\u5217\u8868\u4e2d\u3002\u7531\u4e8e\u65b0\u5217\u8868\u4e2d\u53ef\u80fd\u5305\u542b\u91cd\u590d\u5143\u7d20\uff0c\u6211\u4eec\u4f7f\u7528set\u53bb\u91cd\uff0c\u5e76\u5c06\u7ed3\u679c\u8f6c\u6362\u4e3a\u5217\u8868\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6bd4\u8f83\u4e0d\u540c\u65b9\u6cd5\u7684\u6027\u80fd<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u578b\u5217\u8868\u65f6\uff0c\u4e0d\u540c\u65b9\u6cd5\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002\u4e0b\u9762\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u793a\u4f8b\u6765\u6bd4\u8f83\u4e0a\u8ff0\u4e09\u79cd\u65b9\u6cd5\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h4>\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>from collections import Counter<\/p>\n<p>def find_duplicates_counter(input_list):<\/p>\n<p>    element_counts = Counter(input_list)<\/p>\n<p>    duplicates = [element for element, count in element_counts.items() if count &gt; 1]<\/p>\n<p>    return duplicates<\/p>\n<p>def find_duplicates_set(input_list):<\/p>\n<p>    seen = set()<\/p>\n<p>    duplicates = set()<\/p>\n<p>    for element in input_list:<\/p>\n<p>        if element in seen:<\/p>\n<p>            duplicates.add(element)<\/p>\n<p>        else:<\/p>\n<p>            seen.add(element)<\/p>\n<p>    return list(duplicates)<\/p>\n<p>def find_duplicates_list_comprehension(input_list):<\/p>\n<p>    return list(set([element for element in input_list if input_list.count(element) &gt; 1]))<\/p>\n<p>sample_list = [1, 2, 3, 4, 2, 3, 5, 6, 3, 7, 8, 9, 2] * 1000<\/p>\n<p>start_time = time.time()<\/p>\n<p>find_duplicates_counter(sample_list)<\/p>\n<p>print(&quot;Counter\u65b9\u6cd5\u8017\u65f6: {:.4f}\u79d2&quot;.format(time.time() - start_time))<\/p>\n<p>start_time = time.time()<\/p>\n<p>find_duplicates_set(sample_list)<\/p>\n<p>print(&quot;\u96c6\u5408\u64cd\u4f5c\u65b9\u6cd5\u8017\u65f6: {:.4f}\u79d2&quot;.format(time.time() - start_time))<\/p>\n<p>start_time = time.time()<\/p>\n<p>find_duplicates_list_comprehension(sample_list)<\/p>\n<p>print(&quot;\u5217\u8868\u89e3\u6790\u65b9\u6cd5\u8017\u65f6: {:.4f}\u79d2&quot;.format(time.time() - start_time))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e09\u4e2a\u67e5\u627e\u91cd\u590d\u6570\u636e\u7684\u51fd\u6570\uff0c\u5206\u522b\u4f7f\u7528Counter\u6a21\u5757\u3001\u96c6\u5408\u64cd\u4f5c\u548c\u5217\u8868\u89e3\u6790\u3002\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u5927\u91cf\u91cd\u590d\u6570\u636e\u7684\u793a\u4f8b\u5217\u8868\uff0c\u5e76\u5206\u522b\u6d4b\u91cf\u6bcf\u4e2a\u51fd\u6570\u7684\u6267\u884c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd0\u884c\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u4e0d\u540c\u65b9\u6cd5\u7684\u6027\u80fd\u5dee\u5f02\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528Counter\u6a21\u5757\u7684\u65b9\u6cd5\u6027\u80fd\u8f83\u597d\uff0c\u5176\u6b21\u662f\u96c6\u5408\u64cd\u4f5c\u65b9\u6cd5\uff0c\u800c\u5217\u8868\u89e3\u6790\u65b9\u6cd5\u7684\u6027\u80fd\u76f8\u5bf9\u8f83\u5dee\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\u67e5\u770b\u5217\u8868\u4e2d\u7684\u91cd\u590d\u6570\u636e\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528Counter\u6a21\u5757\u3001\u96c6\u5408\u64cd\u4f5c\u548c\u5217\u8868\u89e3\u6790\u7b49\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\u548c\u9002\u7528\u573a\u666f\u3002\u5728\u5904\u7406\u5c0f\u578b\u5217\u8868\u65f6\uff0c\u4efb\u4f55\u4e00\u79cd\u65b9\u6cd5\u90fd\u53ef\u4ee5\u6ee1\u8db3\u9700\u6c42\uff1b\u4f46\u5728\u5904\u7406\u5927\u578b\u5217\u8868\u65f6\uff0c\u4f7f\u7528Counter\u6a21\u5757\u6216\u96c6\u5408\u64cd\u4f5c\u7684\u65b9\u6cd5\u6027\u80fd\u66f4\u4f73\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u9700\u6c42\u548c\u6570\u636e\u89c4\u6a21\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u60a8\u80fd\u591f\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1Python\u4e2d\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636e\u7684\u5404\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u627e\u5230\u91cd\u590d\u7684\u5217\u8868\u5143\u7d20\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u6765\u67e5\u627e\u5217\u8868\u4e2d\u7684\u91cd\u590d\u5143\u7d20\u3002\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u96c6\u5408\uff08set\uff09\u6765\u8ddf\u8e2a\u5df2\u7ecf\u89c1\u8fc7\u7684\u5143\u7d20\u3002\u901a\u8fc7\u904d\u5386\u5217\u8868\uff0c\u5c06\u6bcf\u4e2a\u5143\u7d20\u6dfb\u52a0\u5230\u96c6\u5408\u4e2d\uff0c\u82e5\u5143\u7d20\u5df2\u5b58\u5728\u4e8e\u96c6\u5408\u4e2d\uff0c\u5219\u8868\u793a\u5b83\u662f\u91cd\u590d\u7684\u3002\u6b64\u5916\uff0c\u4f7f\u7528<code>collections<\/code>\u6a21\u5757\u4e2d\u7684<code>Counter<\/code>\u7c7b\u4e5f\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u7edf\u8ba1\u6bcf\u4e2a\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u4ece\u800c\u8bc6\u522b\u91cd\u590d\u6570\u636e\u3002<\/p>\n<p><strong>\u4f7f\u7528Pandas\u5e93\u6765\u67e5\u627e\u91cd\u590d\u6570\u636e\u7684\u6700\u4f73\u5b9e\u8df5\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5982\u679c\u4f60\u5728\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528Pandas\u5e93\u3002\u901a\u8fc7<code>pd.Series.duplicated()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8f7b\u677e\u6807\u8bc6\u51fa\u91cd\u590d\u9879\u3002\u6b64\u5916\uff0c\u4f7f\u7528<code>pd.DataFrame<\/code>\u7684<code>drop_duplicates()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5feb\u901f\u5220\u9664\u91cd\u590d\u6570\u636e\uff0c\u4fdd\u6301\u6570\u636e\u96c6\u7684\u6574\u6d01\u3002\u8fd9\u79cd\u65b9\u5f0f\u5728\u6570\u636e\u5206\u6790\u4e2d\u5c24\u4e3a\u6709\u6548\u3002<\/p>\n<p><strong>\u5728\u67e5\u627e\u91cd\u590d\u6570\u636e\u65f6\uff0c\u5982\u4f55\u63d0\u9ad8\u4ee3\u7801\u7684\u6027\u80fd\uff1f<\/strong><br \/>\u8981\u63d0\u9ad8\u67e5\u627e\u91cd\u590d\u6570\u636e\u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5b57\u5178\uff08dict\uff09\u6765\u5b58\u50a8\u5143\u7d20\u548c\u5176\u51fa\u73b0\u7684\u6b21\u6570\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u904d\u5386\u5217\u8868\u7684\u540c\u65f6\u8bb0\u5f55\u4fe1\u606f\uff0c\u51cf\u5c11\u65f6\u95f4\u590d\u6742\u5ea6\u3002\u4f7f\u7528\u54c8\u5e0c\u8868\u7684\u65b9\u5f0f\u53ef\u4ee5\u663e\u8457\u52a0\u5feb\u67e5\u627e\u901f\u5ea6\uff0c\u5c24\u5176\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0c\u6027\u80fd\u63d0\u5347\u5c24\u4e3a\u660e\u663e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u67e5\u770b\u5217\u8868\u4e2d\u91cd\u590d\u6570\u636ePython \u5728Python\u4e2d\u67e5\u770b\u5217\u8868\u4e2d\u7684\u91cd\u590d\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528Counter\u6a21\u5757\u3001\u96c6\u5408\u64cd\u4f5c [&hellip;]","protected":false},"author":3,"featured_media":1041728,"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\/1041723"}],"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=1041723"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1041723\/revisions"}],"predecessor-version":[{"id":1041729,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1041723\/revisions\/1041729"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1041728"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1041723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1041723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1041723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}