{"id":1139504,"date":"2025-01-08T22:10:50","date_gmt":"2025-01-08T14:10:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1139504.html"},"modified":"2025-01-08T22:10:53","modified_gmt":"2025-01-08T14:10:53","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e6%95%b0%e5%87%ba%e5%ad%97%e7%ac%a6%e4%b8%b2%e7%9a%84%e5%ad%97%e7%ac%a6%e4%b8%aa%e6%95%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1139504.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u6570\u51fa\u5b57\u7b26\u4e32\u7684\u5b57\u7b26\u4e2a\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25102802\/0080b7bb-0520-4e65-b5c7-2ea2e99e01e4.webp\" alt=\"python\u4e2d\u5982\u4f55\u6570\u51fa\u5b57\u7b26\u4e32\u7684\u5b57\u7b26\u4e2a\u6570\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u6570\u51fa\u5b57\u7b26\u4e32\u7684\u5b57\u7b26\u4e2a\u6570\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u3001\u5faa\u73af\u3001\u96c6\u5408\u64cd\u4f5c\u7b49\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5185\u7f6e\u7684len()\u51fd\u6570\u3001\u5faa\u73af\u8fed\u4ee3\u5b57\u7b26\u4e32\u5e76\u8ba1\u6570\u3001\u4f7f\u7528collections\u6a21\u5757\u4e2d\u7684Counter\u7c7b\u3001\u4ee5\u53ca\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u5339\u914d\u3002<\/strong>\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u4e3e\u4f8b\u8bf4\u660e\u6bcf\u79cd\u65b9\u6cd5\u7684\u5177\u4f53\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570len()<\/h3>\n<\/p>\n<p><p>Python\u5185\u7f6e\u7684len()\u51fd\u6570\u662f\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u6700\u7b80\u5355\u3001\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u8be5\u51fd\u6570\u53ef\u4ee5\u76f4\u63a5\u8fd4\u56de\u5b57\u7b26\u4e32\u4e2d\u5b57\u7b26\u7684\u603b\u6570\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528len()\u51fd\u6570\u7684\u5177\u4f53\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>sample_string = &quot;Hello, World!&quot;<\/p>\n<p>string_length = len(sample_string)<\/p>\n<p>print(f&quot;\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u662f: {string_length}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<strong>len()\u51fd\u6570\u76f4\u63a5\u8fd4\u56de\u4e86\u5b57\u7b26\u4e32\u201cHello, World!\u201d\u7684\u957f\u5ea6\uff0c\u537313<\/strong>\u3002\u8fd9\u5305\u62ec\u4e86\u5b57\u6bcd\u3001\u7a7a\u683c\u4ee5\u53ca\u6807\u70b9\u7b26\u53f7\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5faa\u73af\u8fed\u4ee3\u5b57\u7b26\u4e32\u5e76\u8ba1\u6570<\/h3>\n<\/p>\n<p><p>\u867d\u7136len()\u51fd\u6570\u975e\u5e38\u65b9\u4fbf\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u624b\u52a8\u8ba1\u6570\u5b57\u7b26\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u5faa\u73af\u8fed\u4ee3\u5b57\u7b26\u4e32\u5e76\u7d2f\u52a0\u8ba1\u6570\u5668\u6765\u5b9e\u73b0\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>def count_characters(s):<\/p>\n<p>    count = 0<\/p>\n<p>    for char in s:<\/p>\n<p>        count += 1<\/p>\n<p>    return count<\/p>\n<p>sample_string = &quot;Hello, World!&quot;<\/p>\n<p>string_length = count_characters(sample_string)<\/p>\n<p>print(f&quot;\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u662f: {string_length}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<strong>count_characters\u51fd\u6570\u901a\u8fc7\u904d\u5386\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5b57\u7b26\uff0c\u5e76\u5728\u6bcf\u6b21\u5faa\u73af\u4e2d\u5c06\u8ba1\u6570\u5668\u52a0\u4e00\uff0c\u4ece\u800c\u8ba1\u7b97\u51fa\u5b57\u7b26\u4e32\u7684\u603b\u957f\u5ea6<\/strong>\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528collections\u6a21\u5757\u4e2d\u7684Counter\u7c7b<\/h3>\n<\/p>\n<p><p>Python\u7684collections\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684Counter\u7c7b\uff0c\u53ef\u4ee5\u7528\u4e8e\u7edf\u8ba1\u5b57\u7b26\u51fa\u73b0\u7684\u9891\u7387\u3002\u867d\u7136Counter\u7c7b\u4e3b\u8981\u7528\u4e8e\u7edf\u8ba1\u9891\u7387\uff0c\u4f46\u6211\u4eec\u4e5f\u53ef\u4ee5\u5229\u7528\u5b83\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u603b\u957f\u5ea6\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>from collections import Counter<\/p>\n<p>sample_string = &quot;Hello, World!&quot;<\/p>\n<p>char_counter = Counter(sample_string)<\/p>\n<p>string_length = sum(char_counter.values())<\/p>\n<p>print(f&quot;\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u662f: {string_length}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<strong>Counter\u7c7b\u9996\u5148\u7edf\u8ba1\u4e86\u6bcf\u4e2a\u5b57\u7b26\u51fa\u73b0\u7684\u6b21\u6570\uff0c\u7136\u540e\u901a\u8fc7sum()\u51fd\u6570\u5c06\u8fd9\u4e9b\u6b21\u6570\u76f8\u52a0\uff0c\u5f97\u51fa\u4e86\u5b57\u7b26\u4e32\u7684\u603b\u957f\u5ea6<\/strong>\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u5339\u914d<\/h3>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u5339\u914d\u590d\u6742\u7684\u5b57\u7b26\u6a21\u5f0f\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5b57\u7b26\uff0c\u5e76\u8ba1\u7b97\u5176\u603b\u6570\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>import re<\/p>\n<p>sample_string = &quot;Hello, World!&quot;<\/p>\n<p>pattern = r&#39;.&#39;  # \u5339\u914d\u6240\u6709\u5b57\u7b26<\/p>\n<p>matches = re.findall(pattern, sample_string)<\/p>\n<p>string_length = len(matches)<\/p>\n<p>print(f&quot;\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u662f: {string_length}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<strong>re.findall()\u51fd\u6570\u6839\u636e\u7ed9\u5b9a\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5b57\u7b26\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u5339\u914d\u5217\u8868\uff0c\u901a\u8fc7\u8ba1\u7b97\u8fd9\u4e2a\u5217\u8868\u7684\u957f\u5ea6\uff0c\u6211\u4eec\u5f97\u51fa\u4e86\u5b57\u7b26\u4e32\u7684\u603b\u957f\u5ea6<\/strong>\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u6bd4\u8f83\u4e0e\u4f18\u5316<\/h3>\n<\/p>\n<p><p>\u867d\u7136\u4e0a\u8ff0\u65b9\u6cd5\u90fd\u53ef\u4ee5\u7528\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff0c\u4f46\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\u81f3\u5173\u91cd\u8981\u3002\u4ee5\u4e0b\u662f\u5bf9\u6bcf\u79cd\u65b9\u6cd5\u7684\u6bd4\u8f83\u4e0e\u4f18\u5316\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<p><p><strong>1. len()\u51fd\u6570\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f18\u52bf<\/strong>\uff1a\u7b80\u5355\u3001\u76f4\u63a5\u3001\u6027\u80fd\u9ad8\u3002<\/li>\n<li><strong>\u52a3\u52bf<\/strong>\uff1a\u529f\u80fd\u5355\u4e00\uff0c\u4e0d\u80fd\u7edf\u8ba1\u5b57\u7b26\u9891\u7387\u3002<\/li>\n<li><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\u9700\u8981\u5feb\u901f\u83b7\u53d6\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<p><p><strong>2. \u5faa\u73af\u8fed\u4ee3\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f18\u52bf<\/strong>\uff1a\u7075\u6d3b\uff0c\u53ef\u4ee5\u5728\u8ba1\u6570\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u52a3\u52bf<\/strong>\uff1a\u4ee3\u7801\u8f83\u4e3a\u5197\u957f\uff0c\u6027\u80fd\u4e0d\u5982len()\u51fd\u6570\u3002<\/li>\n<li><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\u9700\u8981\u5728\u8ba1\u6570\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u989d\u5916\u64cd\u4f5c\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<p><p><strong>3. Counter\u7c7b\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f18\u52bf<\/strong>\uff1a\u529f\u80fd\u5f3a\u5927\uff0c\u53ef\u4ee5\u540c\u65f6\u7edf\u8ba1\u5b57\u7b26\u9891\u7387\u3002<\/li>\n<li><strong>\u52a3\u52bf<\/strong>\uff1a\u76f8\u6bd4len()\u51fd\u6570\u7a0d\u5fae\u590d\u6742\u3002<\/li>\n<li><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\u9700\u8981\u7edf\u8ba1\u5b57\u7b26\u9891\u7387\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<p><p><strong>4. \u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f18\u52bf<\/strong>\uff1a\u5f3a\u5927\u7075\u6d3b\uff0c\u53ef\u4ee5\u5339\u914d\u590d\u6742\u6a21\u5f0f\u3002<\/li>\n<li><strong>\u52a3\u52bf<\/strong>\uff1a\u6027\u80fd\u4e0d\u5982len()\u51fd\u6570\u3002<\/li>\n<li><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\u9700\u8981\u5339\u914d\u7279\u5b9a\u5b57\u7b26\u6a21\u5f0f\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<p><h3>\u516d\u3001\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><p>\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u6709\u5f88\u591a\u573a\u666f\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><p><strong>1. \u6570\u636e\u6e05\u6d17\uff1a<\/strong><\/p>\n<p>\u5728\u5904\u7406\u6570\u636e\u65f6\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u8ba1\u7b97\u6bcf\u884c\u6587\u672c\u7684\u957f\u5ea6\uff0c\u4ee5\u4fbf\u7b5b\u9009\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p><strong>2. \u6570\u636e\u5206\u6790\uff1a<\/strong><\/p>\n<p>\u5728\u8fdb\u884c\u6587\u672c\u5206\u6790\u65f6\uff0c\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u7edf\u8ba1\u6587\u7ae0\u7684\u5b57\u6570\u3002<\/p>\n<\/p>\n<p><p><strong>3. \u7528\u6237\u8f93\u5165\u6821\u9a8c\uff1a<\/strong><\/p>\n<p>\u5728\u5f00\u53d1Web\u5e94\u7528\u65f6\uff0c\u6211\u4eec\u9700\u8981\u6821\u9a8c\u7528\u6237\u8f93\u5165\u7684\u6587\u672c\u957f\u5ea6\uff0c\u4ee5\u786e\u4fdd\u5176\u7b26\u5408\u9884\u671f\u3002<\/p>\n<\/p>\n<p><p><strong>4. \u6587\u672c\u5904\u7406\uff1a<\/strong><\/p>\n<p>\u5728\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09\u4e2d\uff0c\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u662f\u4e00\u4e2a\u57fa\u7840\u64cd\u4f5c\uff0c\u4f8b\u5982\u5728\u5206\u8bcd\u3001\u6807\u6ce8\u7b49\u4efb\u52a1\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u8be6\u7ec6\u63a2\u8ba8\u4e86Python\u4e2d\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u51fd\u6570len()\u3001\u5faa\u73af\u8fed\u4ee3\u3001collections\u6a21\u5757\u4e2d\u7684Counter\u7c7b\u4ee5\u53ca\u6b63\u5219\u8868\u8fbe\u5f0f\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c\u9002\u7528\u573a\u666f\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u5e94\u8be5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0\uff0c\u5927\u5bb6\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u548c\u5e94\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff0c\u5e76\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u7075\u6d3b\u8fd0\u7528\uff0c\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5feb\u901f\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>len()<\/code>\u51fd\u6570\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u5b57\u7b26\u4e2a\u6570\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>len(&quot;Hello, World!&quot;)<\/code>\u5c06\u8fd4\u56de13\uff0c\u56e0\u4e3a\u8be5\u5b57\u7b26\u4e32\u5305\u542b13\u4e2a\u5b57\u7b26\uff08\u5305\u62ec\u7a7a\u683c\u548c\u6807\u70b9\u7b26\u53f7\uff09\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u660e\u4e86\uff0c\u9002\u5408\u5404\u79cd\u573a\u666f\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u7edf\u8ba1\u5b57\u7b26\u4e32\u4e2d\u7279\u5b9a\u5b57\u7b26\u7684\u51fa\u73b0\u6b21\u6570\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u63d0\u4f9b\u4e86<code>str.count()<\/code>\u65b9\u6cd5\uff0c\u5141\u8bb8\u7528\u6237\u8ba1\u7b97\u5b57\u7b26\u4e32\u4e2d\u67d0\u4e2a\u7279\u5b9a\u5b57\u7b26\u6216\u5b50\u5b57\u7b26\u4e32\u7684\u51fa\u73b0\u6b21\u6570\u3002\u6bd4\u5982\uff0c<code>&quot;Hello, World!&quot;.count(&#39;o&#39;)<\/code>\u5c06\u8fd4\u56de2\uff0c\u56e0\u4e3a\u5b57\u6bcd\u201co\u201d\u5728\u5b57\u7b26\u4e32\u4e2d\u51fa\u73b0\u4e86\u4e24\u6b21\u3002\u8fd9\u5bf9\u4e8e\u5206\u6790\u6587\u672c\u5185\u5bb9\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p><strong>\u5728\u5904\u7406\u591a\u884c\u5b57\u7b26\u4e32\u65f6\u5982\u4f55\u8ba1\u7b97\u603b\u5b57\u7b26\u6570\uff1f<\/strong><br \/>\u5bf9\u4e8e\u591a\u884c\u5b57\u7b26\u4e32\uff0c\u4ecd\u7136\u53ef\u4ee5\u4f7f\u7528<code>len()<\/code>\u51fd\u6570\uff0c\u4f46\u9700\u8981\u5148\u5c06\u5b57\u7b26\u4e32\u62c6\u5206\u6210\u5355\u72ec\u7684\u884c\u3002\u53ef\u4ee5\u4f7f\u7528<code>str.splitlines()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u6309\u884c\u5206\u5f00\uff0c\u7136\u540e\u4f7f\u7528<code>len()<\/code>\u5bf9\u6bcf\u4e00\u884c\u8fdb\u884c\u8ba1\u6570\uff0c\u518d\u5c06\u6240\u6709\u884c\u7684\u957f\u5ea6\u76f8\u52a0\uff0c\u5f97\u5230\u603b\u5b57\u7b26\u6570\u3002\u8fd9\u79cd\u65b9\u5f0f\u9002\u5408\u4e8e\u9700\u8981\u5206\u6790\u957f\u6587\u672c\u6216\u6587\u6863\u7684\u60c5\u51b5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6570\u51fa\u5b57\u7b26\u4e32\u7684\u5b57\u7b26\u4e2a\u6570\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u3001\u5faa\u73af\u3001\u96c6\u5408\u64cd\u4f5c\u7b49\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1139510,"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\/1139504"}],"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=1139504"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1139504\/revisions"}],"predecessor-version":[{"id":1139511,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1139504\/revisions\/1139511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1139510"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1139504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1139504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1139504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}