{"id":1130960,"date":"2025-01-08T20:44:40","date_gmt":"2025-01-08T12:44:40","guid":{"rendered":""},"modified":"2025-01-08T20:44:42","modified_gmt":"2025-01-08T12:44:42","slug":"python%e5%a6%82%e4%bd%95%e8%be%93%e5%87%ba%e6%96%87%e6%9c%ac%e4%b8%ad%e5%8d%95%e8%af%8d%e5%87%ba%e7%8e%b0%e7%9a%84%e6%ac%a1%e6%95%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1130960.html","title":{"rendered":"python\u5982\u4f55\u8f93\u51fa\u6587\u672c\u4e2d\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100854\/cccc022e-f7c2-4dde-b153-a2e52527d1d2.webp\" alt=\"python\u5982\u4f55\u8f93\u51fa\u6587\u672c\u4e2d\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\" \/><\/p>\n<p><p> <strong>Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u8f93\u51fa\u6587\u672c\u4e2d\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570<\/strong>\uff0c<strong>\u4f7f\u7528Counter\u6a21\u5757\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5b57\u5178\u7edf\u8ba1<\/strong>\u7b49\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u6df1\u5165\u8ba8\u8bba\u5176\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u5373\u4f7f\u7528<code>collections.Counter<\/code>\u6a21\u5757\u6765\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u8bb8\u591a\u5f3a\u5927\u7684\u5e93\u548c\u6a21\u5757\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u8f7b\u677e\u5b8c\u6210\u5404\u79cd\u4efb\u52a1\u3002<code>collections.Counter<\/code>\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u7c7b\uff0c\u53ef\u4ee5\u7528\u6765\u5bf9\u53ef\u54c8\u5e0c\u5bf9\u8c61\u8fdb\u884c\u8ba1\u6570\u3002\u5b83\u7279\u522b\u9002\u7528\u4e8e\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Counter\u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1. \u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165<code>collections<\/code>\u6a21\u5757\u4e2d\u7684<code>Counter<\/code>\u7c7b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import Counter<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8bfb\u53d6\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u8bfb\u53d6\u6587\u672c\u3002\u6211\u4eec\u53ef\u4ee5\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6587\u672c\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u5b9a\u4e49\u6587\u672c\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;&quot;&quot;Python is an interpreted, high-level and general-purpose programming language. Python&#39;s design philosophy emphasizes code readability with its notable use of significant whitespace.&quot;&quot;&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u9884\u5904\u7406\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570\u4e4b\u524d\uff0c\u6700\u597d\u5bf9\u6587\u672c\u8fdb\u884c\u4e00\u4e9b\u9884\u5904\u7406\u3002\u6bd4\u5982\uff0c\u5c06\u6240\u6709\u5b57\u7b26\u8f6c\u6362\u4e3a\u5c0f\u5199\uff0c\u53bb\u6389\u6807\u70b9\u7b26\u53f7\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<h2><strong>\u5c06\u6587\u672c\u8f6c\u6362\u4e3a\u5c0f\u5199<\/strong><\/h2>\n<p>text = text.lower()<\/p>\n<h2><strong>\u53bb\u6389\u6807\u70b9\u7b26\u53f7<\/strong><\/h2>\n<p>text = re.sub(r&#39;[^\\w\\s]&#39;, &#39;&#39;, text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. \u5206\u8bcd<\/h4>\n<\/p>\n<p><p>\u5c06\u9884\u5904\u7406\u540e\u7684\u6587\u672c\u6309\u7a7a\u683c\u5206\u5272\u6210\u5355\u8bcd\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">words = text.split()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5. \u4f7f\u7528Counter\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570<\/h4>\n<\/p>\n<p><p>\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>Counter<\/code>\u6765\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">word_counts = Counter(words)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>6. \u8f93\u51fa\u7ed3\u679c<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u7ed3\u679c\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for word, count in word_counts.items():<\/p>\n<p>    print(f&#39;{word}: {count}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u7edf\u8ba1\u6587\u672c\u4e2d\u6bcf\u4e2a\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\u3002\u8fd9\u4e2a\u65b9\u6cd5\u7b80\u6d01\u9ad8\u6548\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u6587\u672c\u5904\u7406\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u5b57\u5178\u7edf\u8ba1<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528<code>Counter<\/code>\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u5b57\u5178\u6765\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\u3002\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u7565\u663e\u590d\u6742\uff0c\u4f46\u540c\u6837\u975e\u5e38\u6709\u6548\u3002<\/p>\n<\/p>\n<p><h4>1. \u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8bfb\u53d6\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u6211\u4eec\u9700\u8981\u8bfb\u53d6\u6587\u672c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;&quot;&quot;Python is an interpreted, high-level and general-purpose programming language. Python&#39;s design philosophy emphasizes code readability with its notable use of significant whitespace.&quot;&quot;&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u9884\u5904\u7406\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u53bb\u6389\u6807\u70b9\u7b26\u53f7\uff0c\u5e76\u5c06\u6587\u672c\u8f6c\u6362\u4e3a\u5c0f\u5199\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = text.lower()<\/p>\n<p>text = re.sub(r&#39;[^\\w\\s]&#39;, &#39;&#39;, text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. \u5206\u8bcd<\/h4>\n<\/p>\n<p><p>\u5c06\u6587\u672c\u6309\u7a7a\u683c\u5206\u5272\u6210\u5355\u8bcd\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">words = text.split()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>5. \u4f7f\u7528\u5b57\u5178\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570<\/h4>\n<\/p>\n<p><p>\u521d\u59cb\u5316\u4e00\u4e2a\u7a7a\u5b57\u5178\uff0c\u7136\u540e\u904d\u5386\u5355\u8bcd\u5217\u8868\uff0c\u7edf\u8ba1\u6bcf\u4e2a\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">word_counts = {}<\/p>\n<p>for word in words:<\/p>\n<p>    if word in word_counts:<\/p>\n<p>        word_counts[word] += 1<\/p>\n<p>    else:<\/p>\n<p>        word_counts[word] = 1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>6. \u8f93\u51fa\u7ed3\u679c<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u8f93\u51fa\u7edf\u8ba1\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for word, count in word_counts.items():<\/p>\n<p>    print(f&#39;{word}: {count}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5e94\u7528\u573a\u666f\u548c\u4f18\u5316<\/h3>\n<\/p>\n<p><h4>1. \u5e94\u7528\u573a\u666f<\/h4>\n<\/p>\n<p><p>\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570\u5728\u5f88\u591a\u5b9e\u9645\u5e94\u7528\u4e2d\u975e\u5e38\u6709\u7528\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u6587\u672c\u5206\u6790<\/strong>\uff1a\u5206\u6790\u65b0\u95fb\u3001\u6587\u7ae0\u7b49\u6587\u672c\u5185\u5bb9\uff0c\u627e\u51fa\u9ad8\u9891\u8bcd\u6c47\u3002<\/li>\n<li><strong>\u641c\u7d22\u5f15\u64ce\u4f18\u5316\uff08SEO\uff09<\/strong>\uff1a\u5206\u6790\u7f51\u9875\u5185\u5bb9\uff0c\u4f18\u5316\u5173\u952e\u8bcd\u3002<\/li>\n<li><strong>\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09<\/strong>\uff1a\u4e3a<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6a21\u578b\u63d0\u4f9b\u7279\u5f81\u3002<\/li>\n<\/ul>\n<p><h4>2. \u4f18\u5316\u5efa\u8bae<\/h4>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u89c4\u6a21\u6587\u672c\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4ee5\u4e0b\u4f18\u5316\u7b56\u7565\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u591a\u7ebf\u7a0b\u6216\u591a\u8fdb\u7a0b<\/strong>\uff1a\u5229\u7528Python\u7684<code>threading<\/code>\u6216<code>multiprocessing<\/code>\u6a21\u5757\uff0c\u63d0\u9ad8\u5904\u7406\u901f\u5ea6\u3002<\/li>\n<li><strong>\u5185\u5b58\u4f18\u5316<\/strong>\uff1a\u5bf9\u4e8e\u8d85\u5927\u6587\u672c\uff0c\u53ef\u4ee5\u9010\u884c\u8bfb\u53d6\u5e76\u5904\u7406\uff0c\u4ee5\u51cf\u5c11\u5185\u5b58\u5360\u7528\u3002<\/li>\n<li><strong>\u5206\u5e03\u5f0f\u8ba1\u7b97<\/strong>\uff1a\u4f7f\u7528\u5206\u5e03\u5f0f\u8ba1\u7b97\u6846\u67b6\uff08\u5982Hadoop\u3001Spark\uff09\u5904\u7406\u8d85\u5927\u89c4\u6a21\u6587\u672c\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><h3>\u56db\u3001\u6df1\u5165\u7406\u89e3Counter<\/h3>\n<\/p>\n<p><p>Counter\u662fPython\u4e2d\u975e\u5e38\u5f3a\u5927\u7684\u4e00\u4e2a\u5de5\u5177\u7c7b\uff0c\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u4f7f\u7528\u6280\u5de7\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u5404\u79cd\u7edf\u8ba1\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><h4>1. Counter\u7684\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>Counter\u662f\u4e00\u4e2a\u5b50\u7c7b\uff0c\u7528\u4e8e\u8ba1\u6570\u54c8\u5e0c\u5bf9\u8c61\u3002\u5b83\u662f\u4e00\u4e2a\u5b57\u5178\u7684\u5b50\u7c7b\uff0c\u7528\u4e8e\u8ba1\u6570\u53ef\u54c8\u5e0c\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import Counter<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aCounter\u5bf9\u8c61<\/strong><\/h2>\n<p>counter = Counter([&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;a&#39;, &#39;b&#39;, &#39;b&#39;])<\/p>\n<h2><strong>\u8f93\u51fa\u8ba1\u6570\u7ed3\u679c<\/strong><\/h2>\n<p>print(counter)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. Counter\u5bf9\u8c61\u7684\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>Counter\u5bf9\u8c61\u63d0\u4f9b\u4e86\u8bb8\u591a\u6709\u7528\u7684\u65b9\u6cd5\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>elements()<\/strong>\uff1a\u8fd4\u56de\u4e00\u4e2a\u8fed\u4ee3\u5668\uff0c\u5176\u4e2d\u5143\u7d20\u6309\u8ba1\u6570\u503c\u91cd\u590d\u3002<\/li>\n<li><strong>most_common([n])<\/strong>\uff1a\u8fd4\u56de\u4e00\u4e2a\u5217\u8868\uff0c\u5305\u542bn\u4e2a\u6700\u5e38\u89c1\u7684\u5143\u7d20\u53ca\u5176\u8ba1\u6570\u3002<\/li>\n<li><strong>subtract([iterable-or-mapping])<\/strong>\uff1a\u4ece\u8ba1\u6570\u4e2d\u51cf\u53bb\u5143\u7d20\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\"># \u8fd4\u56de\u5143\u7d20\u53ca\u5176\u8ba1\u6570<\/p>\n<p>print(counter.most_common(2))<\/p>\n<h2><strong>\u8fd4\u56de\u5143\u7d20\u7684\u8fed\u4ee3\u5668<\/strong><\/h2>\n<p>print(list(counter.elements()))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Python\u7edf\u8ba1\u6587\u672c\u4e2d\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\uff0c<strong>\u91cd\u70b9\u4ecb\u7ecd\u4e86\u4f7f\u7528Counter\u6a21\u5757\u7684\u65b9\u6cd5<\/strong>\u3002\u540c\u65f6\uff0c\u6211\u4eec\u8fd8\u4ecb\u7ecd\u4e86\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u5b57\u5178\u7edf\u8ba1\u7684\u65b9\u6cd5\uff0c\u5e76\u8ba8\u8bba\u4e86\u76f8\u5173\u7684\u5e94\u7528\u573a\u666f\u548c\u4f18\u5316\u5efa\u8bae\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><p>\u65e0\u8bba\u662f\u8fdb\u884c\u6587\u672c\u5206\u6790\u3001SEO\u4f18\u5316\uff0c\u8fd8\u662fNLP\u5e94\u7528\uff0c\u7edf\u8ba1\u5355\u8bcd\u51fa\u73b0\u6b21\u6570\u90fd\u662f\u4e00\u4e2a\u975e\u5e38\u57fa\u7840\u4e14\u91cd\u8981\u7684\u4efb\u52a1\u3002\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u5404\u79cd\u6587\u672c\u5904\u7406\u4efb\u52a1\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\uff1f<\/strong><br \/>\u8981\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u3002\u901a\u8fc7\u6307\u5b9a\u6587\u4ef6\u8def\u5f84\u548c\u8bfb\u53d6\u6a21\u5f0f\uff08\u4f8b\u5982&#39;r&#39;\u8868\u793a\u53ea\u8bfb\uff09\uff0c\u53ef\u4ee5\u8f7b\u677e\u83b7\u53d6\u6587\u4ef6\u5185\u5bb9\u3002\u4f7f\u7528<code>read()<\/code>\u6216<code>readlines()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06\u6574\u4e2a\u6587\u4ef6\u5185\u5bb9\u6216\u6309\u884c\u8bfb\u53d6\uff0c\u4fbf\u4e8e\u540e\u7eed\u5904\u7406\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u6587\u672c\u6570\u636e\u4ee5\u8ba1\u7b97\u5355\u8bcd\u9891\u7387\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>str.split()<\/code>\u65b9\u6cd5\u5c06\u6587\u672c\u62c6\u5206\u4e3a\u5355\u8bcd\uff0c\u7136\u540e\u5229\u7528<code>collections.Counter<\/code>\u7c7b\u6765\u7edf\u8ba1\u6bcf\u4e2a\u5355\u8bcd\u7684\u51fa\u73b0\u6b21\u6570\u3002\u8fd9\u6837\u4e0d\u4ec5\u7b80\u5355\u6613\u61c2\uff0c\u800c\u4e14\u53ef\u4ee5\u5904\u7406\u5927\u91cf\u6587\u672c\u6570\u636e\uff0c\u5feb\u901f\u83b7\u5f97\u5355\u8bcd\u9891\u7387\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709Python\u5e93\u53ef\u4ee5\u5e2e\u52a9\u6211\u66f4\u9ad8\u6548\u5730\u8ba1\u7b97\u5355\u8bcd\u51fa\u73b0\u6b21\u6570\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u7684<code>collections<\/code>\u6a21\u5757\u4e2d\u7684<code>Counter<\/code>\u7c7b\u975e\u5e38\u9002\u5408\u8fd9\u4e00\u4efb\u52a1\u3002\u9664\u6b64\u4e4b\u5916\uff0c<code>nltk<\/code>\u548c<code>pandas<\/code>\u7b49\u5e93\u4e5f\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6587\u672c\u5904\u7406\u529f\u80fd\uff0c\u80fd\u591f\u8fdb\u884c\u66f4\u590d\u6742\u7684\u6587\u672c\u5206\u6790\u548c\u6570\u636e\u5904\u7406\u3002\u9009\u62e9\u9002\u5408\u81ea\u5df1\u7684\u5e93\uff0c\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u8f93\u51fa\u6587\u672c\u4e2d\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570\uff0c\u4f7f\u7528Counter\u6a21\u5757\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5b57\u5178\u7edf\u8ba1\u7b49\u3002\u4e0b\u9762\u6211 [&hellip;]","protected":false},"author":3,"featured_media":1130966,"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\/1130960"}],"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=1130960"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130960\/revisions"}],"predecessor-version":[{"id":1130969,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130960\/revisions\/1130969"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1130966"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1130960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1130960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1130960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}