{"id":1144153,"date":"2025-01-08T22:57:11","date_gmt":"2025-01-08T14:57:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1144153.html"},"modified":"2025-01-08T22:57:14","modified_gmt":"2025-01-08T14:57:14","slug":"python%e5%a6%82%e4%bd%95%e6%8f%90%e5%8f%96%e5%87%ba%e5%ad%97%e7%ac%a6%e4%b8%b2%e4%b8%ad%e7%9b%b8%e5%90%8c%e7%9a%84%e4%b8%b2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1144153.html","title":{"rendered":"python\u5982\u4f55\u63d0\u53d6\u51fa\u5b57\u7b26\u4e32\u4e2d\u76f8\u540c\u7684\u4e32"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181411\/e011df09-0770-4b20-9b56-27fc74495967.webp\" alt=\"python\u5982\u4f55\u63d0\u53d6\u51fa\u5b57\u7b26\u4e32\u4e2d\u76f8\u540c\u7684\u4e32\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u63d0\u53d6\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u540c\u5b50\u4e32\uff0c\u901a\u5e38\u4f7f\u7528\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u4ee5\u53ca\u96c6\u5408\u7b49\u65b9\u6cd5\u3002\u53ef\u4ee5\u901a\u8fc7\u5185\u7f6e\u51fd\u6570\u3001\u6a21\u5757\u4ee5\u53ca\u81ea\u5b9a\u4e49\u51fd\u6570\u8fdb\u884c\u5b9e\u73b0\uff0c\u5173\u952e\u6b65\u9aa4\u5305\u62ec\uff1a\u904d\u5386\u5b57\u7b26\u4e32\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u3001\u5229\u7528\u96c6\u5408\u53bb\u91cd\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u5e76\u4e3e\u4f8b\u8bf4\u660e\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e0e\u904d\u5386<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e0e\u904d\u5386\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u627e\u5230\u5e76\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u540c\u5b50\u4e32\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u672c\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u6700\u57fa\u7840\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u4e24\u91cd\u5faa\u73af\u904d\u5386\u5b57\u7b26\u4e32\u7684\u6240\u6709\u5b50\u4e32\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728\u4e00\u4e2a\u5b57\u5178\u4e2d\uff0c\u7edf\u8ba1\u5176\u51fa\u73b0\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    substr_dict = {}<\/p>\n<p>    length = len(s)<\/p>\n<p>    for i in range(length):<\/p>\n<p>        for j in range(i + 1, length + 1):<\/p>\n<p>            substr = s[i:j]<\/p>\n<p>            if substr in substr_dict:<\/p>\n<p>                substr_dict[substr] += 1<\/p>\n<p>            else:<\/p>\n<p>                substr_dict[substr] = 1<\/p>\n<p>    repeated_substrings = [key for key, value in substr_dict.items() if value &gt; 1]<\/p>\n<p>    return repeated_substrings<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f18\u5316\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u4e0a\u9762\u7684\u57fa\u672c\u65b9\u6cd5\u5728\u5904\u7406\u957f\u5b57\u7b26\u4e32\u65f6\u6548\u7387\u8f83\u4f4e\uff0c\u53ef\u4ee5\u4f7f\u7528\u96c6\u5408\u6765\u4f18\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    seen = set()<\/p>\n<p>    repeated = set()<\/p>\n<p>    length = len(s)<\/p>\n<p>    for i in range(length):<\/p>\n<p>        for j in range(i + 1, length + 1):<\/p>\n<p>            substr = s[i:j]<\/p>\n<p>            if substr in seen:<\/p>\n<p>                repeated.add(substr)<\/p>\n<p>            seen.add(substr)<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u6b63\u5219\u8868\u8fbe\u5f0f<\/h3>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5b57\u7b26\u4e32\u5904\u7406\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u67e5\u627e\u548c\u63d0\u53d6\u76f8\u540c\u5b50\u4e32\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528re\u6a21\u5757<\/h4>\n<\/p>\n<p><p>Python\u7684re\u6a21\u5757\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u64cd\u4f5c\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>def find_repeated_substrings(s):<\/p>\n<p>    repeated = set()<\/p>\n<p>    for i in range(1, len(s)):<\/p>\n<p>        pattern = r&#39;(.{%d}).*?\\1&#39; % i<\/p>\n<p>        matches = re.findall(pattern, s)<\/p>\n<p>        repeated.update(matches)<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u9ad8\u7ea7\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u8fdb\u4e00\u6b65\u5229\u7528\u547d\u540d\u6355\u83b7\u7ec4\u548c\u96f6\u5bbd\u65ad\u8a00\u6765\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u5339\u914d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>def find_repeated_substrings(s):<\/p>\n<p>    pattern = r&#39;(?P&lt;substr&gt;.+)(?=.*(?P=substr))&#39;<\/p>\n<p>    matches = re.finditer(pattern, s)<\/p>\n<p>    repeated = {match.group(&#39;substr&#39;) for match in matches}<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u96c6\u5408\u4e0e\u5b57\u5178<\/h3>\n<\/p>\n<p><p>\u96c6\u5408\u548c\u5b57\u5178\u662fPython\u4e2d\u5e38\u7528\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u53bb\u91cd\u548c\u7edf\u8ba1\u5b50\u4e32\u51fa\u73b0\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><h4>1. \u5229\u7528\u96c6\u5408\u53bb\u91cd<\/h4>\n<\/p>\n<p><p>\u96c6\u5408\u5177\u6709\u5929\u7136\u7684\u53bb\u91cd\u7279\u6027\uff0c\u53ef\u4ee5\u7528\u6765\u627e\u5230\u76f8\u540c\u7684\u5b50\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    seen = set()<\/p>\n<p>    repeated = set()<\/p>\n<p>    for i in range(len(s)):<\/p>\n<p>        for j in range(i + 1, len(s) + 1):<\/p>\n<p>            substr = s[i:j]<\/p>\n<p>            if substr in seen:<\/p>\n<p>                repeated.add(substr)<\/p>\n<p>            seen.add(substr)<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u7ed3\u5408\u5b57\u5178\u8fdb\u884c\u7edf\u8ba1<\/h4>\n<\/p>\n<p><p>\u5b57\u5178\u53ef\u4ee5\u8bb0\u5f55\u5b50\u4e32\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u4ece\u800c\u7b5b\u9009\u51fa\u51fa\u73b0\u6b21\u6570\u5927\u4e8e1\u7684\u5b50\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    substr_count = {}<\/p>\n<p>    for i in range(len(s)):<\/p>\n<p>        for j in range(i + 1, len(s) + 1):<\/p>\n<p>            substr = s[i:j]<\/p>\n<p>            if substr in substr_count:<\/p>\n<p>                substr_count[substr] += 1<\/p>\n<p>            else:<\/p>\n<p>                substr_count[substr] = 1<\/p>\n<p>    repeated_substrings = [substr for substr, count in substr_count.items() if count &gt; 1]<\/p>\n<p>    return repeated_substrings<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5b9e\u9645\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u540c\u5b50\u4e32\u53ef\u4ee5\u7528\u4e8e\u591a\u79cd\u573a\u666f\uff0c\u4f8b\u5982\u57fa\u56e0\u5e8f\u5217\u5206\u6790\u3001\u6587\u672c\u91cd\u590d\u68c0\u6d4b\u3001\u6570\u636e\u6e05\u6d17\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. \u57fa\u56e0\u5e8f\u5217\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u5728\u57fa\u56e0\u5e8f\u5217\u5206\u6790\u4e2d\uff0c\u627e\u5230\u76f8\u540c\u7684\u5b50\u4e32\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u91cd\u590d\u7684DNA\u7247\u6bb5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_dna_sequences(dna):<\/p>\n<p>    return find_repeated_substrings(dna)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>dna_sequence = &quot;ACTGACTGACTG&quot;<\/p>\n<p>print(find_repeated_dna_sequences(dna_sequence))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u6587\u672c\u91cd\u590d\u68c0\u6d4b<\/h4>\n<\/p>\n<p><p>\u5728\u6587\u672c\u5904\u7406\u548c\u81ea\u7136\u8bed\u8a00\u5904\u7406\u4e2d\uff0c\u53ef\u4ee5\u7528\u6765\u68c0\u6d4b\u91cd\u590d\u7684\u53e5\u5b50\u6216\u6bb5\u843d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_sentences(text):<\/p>\n<p>    sentences = text.split(&#39;.&#39;)<\/p>\n<p>    return find_repeated_substrings(&#39; &#39;.join(sentences))<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>text = &quot;This is a test. This is only a test. This is a test.&quot;<\/p>\n<p>print(find_repeated_sentences(text))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u5728\u6570\u636e\u6e05\u6d17\u8fc7\u7a0b\u4e2d\uff0c\u63d0\u53d6\u76f8\u540c\u7684\u5b50\u4e32\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u548c\u5220\u9664\u91cd\u590d\u7684\u6570\u636e\u6761\u76ee\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def clean_repeated_data(data):<\/p>\n<p>    repeated_substrings = find_repeated_substrings(data)<\/p>\n<p>    for substr in repeated_substrings:<\/p>\n<p>        data = data.replace(substr, &#39;&#39;)<\/p>\n<p>    return data<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>data = &quot;duplicate data duplicate data&quot;<\/p>\n<p>print(clean_repeated_data(data))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u6027\u80fd\u4f18\u5316<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0c\u6027\u80fd\u4f18\u5316\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u7b56\u7565\u63d0\u9ad8\u6548\u7387\uff1a<\/p>\n<\/p>\n<p><h4>1. \u6ed1\u52a8\u7a97\u53e3\u6cd5<\/h4>\n<\/p>\n<p><p>\u6ed1\u52a8\u7a97\u53e3\u6cd5\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u91cd\u590d\u8ba1\u7b97\uff0c\u63d0\u5347\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    n = len(s)<\/p>\n<p>    seen = set()<\/p>\n<p>    repeated = set()<\/p>\n<p>    for length in range(1, n):<\/p>\n<p>        for i in range(n - length + 1):<\/p>\n<p>            substr = s[i:i + length]<\/p>\n<p>            if substr in seen:<\/p>\n<p>                repeated.add(substr)<\/p>\n<p>            seen.add(substr)<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5b57\u7b26\u4e32\u54c8\u5e0c<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u5b57\u7b26\u4e32\u54c8\u5e0c\u6280\u672f\u53ef\u4ee5\u5feb\u901f\u8ba1\u7b97\u5b50\u4e32\u7684\u54c8\u5e0c\u503c\uff0c\u4ece\u800c\u52a0\u5feb\u67e5\u627e\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def find_repeated_substrings(s):<\/p>\n<p>    def hash_code(substr):<\/p>\n<p>        return hash(substr)<\/p>\n<p>    n = len(s)<\/p>\n<p>    seen = set()<\/p>\n<p>    repeated = set()<\/p>\n<p>    for length in range(1, n):<\/p>\n<p>        for i in range(n - length + 1):<\/p>\n<p>            substr = s[i:i + length]<\/p>\n<p>            hashed = hash_code(substr)<\/p>\n<p>            if hashed in seen:<\/p>\n<p>                repeated.add(substr)<\/p>\n<p>            seen.add(hashed)<\/p>\n<p>    return list(repeated)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>input_str = &quot;abcabc&quot;<\/p>\n<p>print(find_repeated_substrings(input_str))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u540c\u5b50\u4e32\u5728Python\u4e2d\u6709\u591a\u79cd\u5b9e\u73b0\u65b9\u6cd5\uff0c\u5305\u62ec\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e0e\u904d\u5386\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u96c6\u5408\u4e0e\u5b57\u5178\u7b49\u3002\u6bcf\u79cd\u65b9\u6cd5\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387\u548c\u51c6\u786e\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7ed3\u5408\u5177\u4f53\u9700\u6c42\u548c\u6570\u636e\u7279\u70b9\uff0c\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u89e3\u51b3\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\u7684\u5bf9\u6bd4\u548c\u4f18\u5316\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u76f8\u540c\u5b50\u4e32\u7684\u6280\u672f\uff0c\u4e3a\u5b9e\u9645\u9879\u76ee\u63d0\u4f9b\u53ef\u9760\u7684\u6280\u672f\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u91cd\u590d\u5b50\u4e32\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u5b57\u5178\u6765\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u91cd\u590d\u7684\u5b50\u4e32\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5e2e\u52a9\u5feb\u901f\u5339\u914d\u6a21\u5f0f\uff0c\u800c\u5b57\u5178\u5219\u53ef\u4ee5\u8bb0\u5f55\u6bcf\u4e2a\u5b50\u4e32\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u4ece\u800c\u627e\u51fa\u91cd\u590d\u90e8\u5206\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5229\u7528<code>collections.Counter<\/code>\u6765\u7edf\u8ba1\u5b50\u4e32\u7684\u51fa\u73b0\u9891\u7387\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u63d0\u53d6\u91cd\u590d\u5b50\u4e32\u7684\u5e38\u7528\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5faa\u73af\u904d\u5386\u6240\u6709\u53ef\u80fd\u7684\u5b50\u4e32\u5e76\u4f7f\u7528\u5b57\u5178\u6216\u96c6\u5408\u6765\u8bb0\u5f55\u5b83\u4eec\u7684\u51fa\u73b0\u60c5\u51b5\u3002\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u63d0\u53d6\u7279\u5b9a\u7684\u6a21\u5f0f\uff0c\u800c\u81ea\u5b9a\u4e49\u7684\u5faa\u73af\u65b9\u6cd5\u5219\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u60c5\u51b5\u3002<\/p>\n<p><strong>\u5728\u63d0\u53d6\u91cd\u590d\u5b50\u4e32\u65f6\uff0c\u6709\u54ea\u4e9b\u6ce8\u610f\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u5b57\u7b26\u4e32\u5904\u7406\u65f6\uff0c\u9700\u8981\u8003\u8651\u5b50\u4e32\u7684\u957f\u5ea6\u3001\u5927\u5c0f\u5199\u654f\u611f\u6027\u4ee5\u53ca\u662f\u5426\u9700\u8981\u53bb\u9664\u7a7a\u683c\u7b49\u56e0\u7d20\u3002\u6b64\u5916\uff0c\u5904\u7406\u8f83\u957f\u5b57\u7b26\u4e32\u65f6\uff0c\u6548\u7387\u4e5f\u662f\u4e00\u4e2a\u9700\u8981\u5173\u6ce8\u7684\u70b9\uff0c\u907f\u514d\u5728\u7b97\u6cd5\u4e0a\u9020\u6210\u4e0d\u5fc5\u8981\u7684\u6027\u80fd\u635f\u8017\u3002\u5728\u5b9e\u73b0\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u6ed1\u52a8\u7a97\u53e3\u6216\u5176\u4ed6\u9ad8\u6548\u7b97\u6cd5\u6765\u4f18\u5316\u6027\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u63d0\u53d6\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u540c\u5b50\u4e32\uff0c\u901a\u5e38\u4f7f\u7528\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u4ee5\u53ca\u96c6\u5408\u7b49\u65b9\u6cd5\u3002\u53ef\u4ee5\u901a\u8fc7\u5185\u7f6e\u51fd\u6570\u3001\u6a21\u5757 [&hellip;]","protected":false},"author":3,"featured_media":1144160,"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\/1144153"}],"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=1144153"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1144153\/revisions"}],"predecessor-version":[{"id":1144163,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1144153\/revisions\/1144163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1144160"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1144153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1144153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1144153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}