{"id":1145760,"date":"2025-01-08T23:10:59","date_gmt":"2025-01-08T15:10:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1145760.html"},"modified":"2025-01-08T23:11:01","modified_gmt":"2025-01-08T15:11:01","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8a%e5%8f%96%e9%99%a4%e4%ba%86%e7%ac%ac%e4%b8%80%e4%b8%aa%e7%9a%84%e5%ad%97%e7%ac%a6%e7%aa%9c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1145760.html","title":{"rendered":"python\u5982\u4f55\u628a\u53d6\u9664\u4e86\u7b2c\u4e00\u4e2a\u7684\u5b57\u7b26\u7a9c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24182152\/8684f317-efd8-49b5-b562-3ec61bc5cb6a.webp\" alt=\"python\u5982\u4f55\u628a\u53d6\u9664\u4e86\u7b2c\u4e00\u4e2a\u7684\u5b57\u7b26\u7a9c\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u83b7\u53d6\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u5207\u7247\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u7b49\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u5b57\u7b26\u4e32\u5207\u7247\u6765\u5b9e\u73b0\u3002<\/strong> \u5b57\u7b26\u4e32\u5207\u7247\u7684\u4e3b\u8981\u4f18\u70b9\u662f\u7b80\u6d01\u9ad8\u6548\uff0c\u80fd\u591f\u5feb\u901f\u83b7\u53d6\u6240\u9700\u7684\u5b50\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u5b57\u7b26\u4e32\u5207\u7247\u7684\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u4f60\u53ea\u9700\u8981\u6307\u5b9a\u5b57\u7b26\u4e32\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u4f4d\u7f6e\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32<code>str<\/code>\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7<code>str[1:]<\/code>\u6765\u83b7\u53d6\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u4e0d\u540c\u7684\u65b9\u6cd5\u53ca\u5176\u5b9e\u73b0\uff0c\u5305\u62ec\u5b57\u7b26\u4e32\u5207\u7247\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u7b49\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e00\u3001\u5b57\u7b26\u4e32\u5207\u7247<\/strong><\/h2>\n<p><p>\u5b57\u7b26\u4e32\u5207\u7247\u662fPython\u4e2d\u5904\u7406\u5b57\u7b26\u4e32\u7684\u5e38\u89c1\u65b9\u6cd5\u3002\u901a\u8fc7\u5207\u7247\u53ef\u4ee5\u8f7b\u677e\u83b7\u53d6\u5b50\u5b57\u7b26\u4e32\uff0c\u5e76\u4e14\u64cd\u4f5c\u8d77\u6765\u975e\u5e38\u76f4\u89c2\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u4ecb\u7ecd\uff1a<\/p>\n<\/p>\n<p><h2>1.1 \u57fa\u672c\u5207\u7247\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u5207\u7247\u7684\u8bed\u6cd5\u662f<code>str[start:end:step]<\/code>\uff0c\u5176\u4e2d<code>start<\/code>\u8868\u793a\u8d77\u59cb\u4f4d\u7f6e\uff0c<code>end<\/code>\u8868\u793a\u7ed3\u675f\u4f4d\u7f6e\uff08\u4e0d\u5305\u542b\uff09\uff0c<code>step<\/code>\u8868\u793a\u6b65\u957f\u3002\u8981\u83b7\u53d6\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\uff0c\u53ef\u4ee5\u4f7f\u7528<code>str[1:]<\/code>\uff0c\u5176\u4e2d<code>1<\/code>\u8868\u793a\u4ece\u7b2c\u4e8c\u4e2a\u5b57\u7b26\u5f00\u59cb\uff0c\u7701\u7565<code>end<\/code>\u8868\u793a\u4e00\u76f4\u5230\u5b57\u7b26\u4e32\u7684\u672b\u5c3e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">original_string = &quot;Hello, world!&quot;<\/p>\n<p>sliced_string = original_string[1:]<\/p>\n<p>print(sliced_string)  # \u8f93\u51fa: &quot;ello, world!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>1.2 \u5904\u7406\u7279\u6b8a\u60c5\u51b5<\/h2>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5b57\u7b26\u4e32\u65f6\uff0c\u9700\u8981\u8003\u8651\u4e00\u4e9b\u7279\u6b8a\u60c5\u51b5\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5b57\u7b26\u4e32\u4e3a\u7a7a\u6216\u53ea\u6709\u4e00\u4e2a\u5b57\u7b26\uff0c\u5207\u7247\u540e\u7684\u7ed3\u679c\u4f1a\u6709\u6240\u4e0d\u540c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">empty_string = &quot;&quot;<\/p>\n<p>single_char_string = &quot;H&quot;<\/p>\n<p>print(empty_string[1:])  # \u8f93\u51fa: &quot;&quot;<\/p>\n<p>print(single_char_string[1:])  # \u8f93\u51fa: &quot;&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5207\u7247\u64cd\u4f5c\u4f1a\u8fd4\u56de\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\uff0c\u8fd9\u4e5f\u662f\u7b26\u5408\u9884\u671f\u7684\u884c\u4e3a\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5<\/strong><\/h2>\n<p><p>\u9664\u4e86\u4f7f\u7528\u5b57\u7b26\u4e32\u5207\u7247\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5b57\u7b26\u4e32\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u4e8e\u5904\u7406\u5b57\u7b26\u4e32\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec<code>lstrip()<\/code>\u3001<code>replace()<\/code>\u7b49\uff0c\u4f46\u5b83\u4eec\u901a\u5e38\u7528\u4e8e\u7279\u5b9a\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h2>2.1 \u4f7f\u7528lstrip\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p><code>lstrip()<\/code>\u65b9\u6cd5\u7528\u4e8e\u79fb\u9664\u5b57\u7b26\u4e32\u5de6\u4fa7\u7684\u6307\u5b9a\u5b57\u7b26\u3002\u867d\u7136\u5b83\u4e0d\u662f\u4e13\u95e8\u7528\u4e8e\u83b7\u53d6\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u4ee5\u4f7f\u7528\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c<code>lstrip()<\/code>\u4f1a\u79fb\u9664\u6240\u6709\u6307\u5b9a\u7684\u5b57\u7b26\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u7b2c\u4e00\u4e2a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">original_string = &quot;Hello, world!&quot;<\/p>\n<p>stripped_string = original_string.lstrip(&quot;H&quot;)<\/p>\n<p>print(stripped_string)  # \u8f93\u51fa: &quot;ello, world!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>2.2 \u4f7f\u7528replace\u65b9\u6cd5<\/h2>\n<\/p>\n<p><p><code>replace()<\/code>\u65b9\u6cd5\u7528\u4e8e\u66ff\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u6307\u5b9a\u5b57\u7b26\u6216\u5b50\u5b57\u7b26\u4e32\u3002\u53ef\u4ee5\u901a\u8fc7\u66ff\u6362\u7b2c\u4e00\u4e2a\u5b57\u7b26\u4e3a\u7a7a\u5b57\u7b26\u4e32\u6765\u8fbe\u5230\u76ee\u7684\uff0c\u4f46\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u63a8\u8350\uff0c\u56e0\u4e3a\u5b83\u4f1a\u66ff\u6362\u6240\u6709\u51fa\u73b0\u7684\u6307\u5b9a\u5b57\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">original_string = &quot;Hello, world!&quot;<\/p>\n<p>replaced_string = original_string.replace(&quot;H&quot;, &quot;&quot;, 1)<\/p>\n<p>print(replaced_string)  # \u8f93\u51fa: &quot;ello, world!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e09\u3001\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong><\/h2>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5904\u7406\u5b57\u7b26\u4e32\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u590d\u6742\u7684\u5b57\u7b26\u4e32\u64cd\u4f5c\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u6765\u5b9e\u73b0\u6b63\u5219\u8868\u8fbe\u5f0f\u64cd\u4f5c\u3002\u867d\u7136\u6b63\u5219\u8868\u8fbe\u5f0f\u901a\u5e38\u7528\u4e8e\u66f4\u590d\u6742\u7684\u5339\u914d\u548c\u66ff\u6362\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>original_string = &quot;Hello, world!&quot;<\/p>\n<p>regex_pattern = r&quot;^.(.*)&quot;<\/p>\n<p>match = re.match(regex_pattern, original_string)<\/p>\n<p>if match:<\/p>\n<p>    result = match.group(1)<\/p>\n<p>    print(result)  # \u8f93\u51fa: &quot;ello, world!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u56db\u3001\u7efc\u5408\u5e94\u7528\u548c\u6027\u80fd\u8003\u8651<\/strong><\/h2>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u4e3b\u8981\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u9700\u6c42\u548c\u6027\u80fd\u8003\u8651\u3002\u5b57\u7b26\u4e32\u5207\u7247\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u7b80\u5355\u9ad8\u6548\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u573a\u666f\u3002\u800c\u5b57\u7b26\u4e32\u65b9\u6cd5\u548c\u6b63\u5219\u8868\u8fbe\u5f0f\u5219\u9002\u7528\u4e8e\u7279\u5b9a\u9700\u6c42\u548c\u590d\u6742\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h2>4.1 \u6027\u80fd\u5bf9\u6bd4<\/h2>\n<\/p>\n<p><p>\u4e3a\u4e86\u6bd4\u8f83\u4e0d\u540c\u65b9\u6cd5\u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u4f7f\u7528<code>timeit<\/code>\u6a21\u5757\u8fdb\u884c\u57fa\u51c6\u6d4b\u8bd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u57fa\u51c6\u6d4b\u8bd5\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import timeit<\/p>\n<p>original_string = &quot;Hello, world!&quot;<\/p>\n<p>slice_time = timeit.timeit(lambda: original_string[1:], number=1000000)<\/p>\n<p>lstrip_time = timeit.timeit(lambda: original_string.lstrip(&quot;H&quot;), number=1000000)<\/p>\n<p>replace_time = timeit.timeit(lambda: original_string.replace(&quot;H&quot;, &quot;&quot;, 1), number=1000000)<\/p>\n<p>print(f&quot;Slice time: {slice_time}&quot;)<\/p>\n<p>print(f&quot;lstrip time: {lstrip_time}&quot;)<\/p>\n<p>print(f&quot;Replace time: {replace_time}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5b57\u7b26\u4e32\u5207\u7247\u7684\u6027\u80fd\u662f\u6700\u4f18\u7684\uff0c\u56e0\u4e3a\u5b83\u662f\u76f4\u63a5\u64cd\u4f5c\u5b57\u7b26\u4e32\u7684\u5e95\u5c42\u5b9e\u73b0\uff0c\u800c<code>lstrip()<\/code>\u548c<code>replace()<\/code>\u65b9\u6cd5\u5219\u9700\u8981\u989d\u5916\u7684\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h2>4.2 \u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h2>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9700\u8981\u5904\u7406\u5b57\u7b26\u4e32\u7684\u573a\u666f\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5177\u4f53\u7684\u5e94\u7528\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><h3>4.2.1 \u6570\u636e\u6e05\u6d17<\/h3>\n<\/p>\n<p><p>\u5728\u6570\u636e\u6e05\u6d17\u8fc7\u7a0b\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5904\u7406\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff0c\u4ece\u7528\u6237\u8f93\u5165\u4e2d\u53bb\u9664\u67d0\u4e9b\u524d\u7f00\u6216\u7279\u6b8a\u5b57\u7b26\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">user_input = &quot;12345-67890&quot;<\/p>\n<p>cleaned_input = user_input[1:]<\/p>\n<p>print(cleaned_input)  # \u8f93\u51fa: &quot;2345-67890&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4.2.2 \u6587\u4ef6\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u4ece\u6587\u4ef6\u540d\u6216\u8def\u5f84\u4e2d\u53bb\u9664\u7279\u5b9a\u5b57\u7b26\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = &quot;\/path\/to\/file.txt&quot;<\/p>\n<p>cleaned_path = file_path[1:]<\/p>\n<p>print(cleaned_path)  # \u8f93\u51fa: &quot;path\/to\/file.txt&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e94\u3001\u7ed3\u8bba<\/strong><\/h2>\n<p><p>\u5728Python\u4e2d\uff0c\u83b7\u53d6\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\u6709\u591a\u79cd\u65b9\u6cd5\u3002\u5176\u4e2d\uff0c<strong>\u5b57\u7b26\u4e32\u5207\u7247\u662f\u6700\u5e38\u7528\u4e14\u9ad8\u6548\u7684\u65b9\u6cd5<\/strong>\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u573a\u666f\u3002<strong>\u5b57\u7b26\u4e32\u65b9\u6cd5\u548c\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong>\u5219\u9002\u7528\u4e8e\u7279\u5b9a\u9700\u6c42\u548c\u590d\u6742\u64cd\u4f5c\u3002\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u6027\u80fd\u8003\u8651\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6267\u884c\u6548\u7387\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u5904\u7406\u5b57\u7b26\u4e32\u64cd\u4f5c\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5207\u7247\u8f7b\u677e\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u3002\u5177\u4f53\u65b9\u6cd5\u662f\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u5207\u7247\u529f\u80fd\uff0c\u4f8b\u5982\uff1a<code>your_string[1:]<\/code>\u3002\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u8fd4\u56de\u4ece\u7b2c\u4e8c\u4e2a\u5b57\u7b26\u5f00\u59cb\u5230\u6700\u540e\u4e00\u4e2a\u5b57\u7b26\u7684\u6240\u6709\u5185\u5bb9\u3002<\/p>\n<p><strong>\u4f7f\u7528\u5b57\u7b26\u4e32\u65b9\u6cd5\u662f\u5426\u53ef\u4ee5\u53bb\u9664\u7b2c\u4e00\u4e2a\u5b57\u7b26\uff1f<\/strong><br \/>\u786e\u5b9e\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u7684<code>lstrip()<\/code>\u65b9\u6cd5\u53bb\u9664\u5b57\u7b26\u4e32\u5f00\u5934\u7684\u7279\u5b9a\u5b57\u7b26\uff0c\u4e0d\u8fc7\u5b83\u5e76\u4e0d\u4e13\u95e8\u7528\u4e8e\u53bb\u6389\u7b2c\u4e00\u4e2a\u5b57\u7b26\uff0c\u800c\u662f\u7528\u4e8e\u53bb\u6389\u6307\u5b9a\u7684\u5b57\u7b26\u3002\u5982\u679c\u9700\u8981\u7b80\u5355\u5730\u53bb\u6389\u7b2c\u4e00\u4e2a\u5b57\u7b26\uff0c\u4f7f\u7528\u5207\u7247\u4f1a\u66f4\u76f4\u63a5\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5305\u542b\u7a7a\u683c\u6216\u7279\u6b8a\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u5728\u5904\u7406\u5305\u542b\u7a7a\u683c\u6216\u7279\u6b8a\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u53bb\u9664\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u64cd\u4f5c\u4f9d\u7136\u6709\u6548\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u5b57\u7b26\u4e32<code>&quot; Hello&quot;<\/code>\uff0c\u4f7f\u7528\u5207\u7247<code>your_string[1:]<\/code>\u5c06\u8fd4\u56de<code>&quot;Hello&quot;<\/code>\u3002\u5982\u679c\u9700\u8981\u53bb\u9664\u7a7a\u683c\u6216\u7279\u5b9a\u5b57\u7b26\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528<code>lstrip()<\/code>\u6216\u5176\u4ed6\u5b57\u7b26\u4e32\u5904\u7406\u65b9\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u83b7\u53d6\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u9664\u53bb\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u90e8\u5206\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u5207\u7247\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u7b49\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002\u5176\u4e2d\uff0c [&hellip;]","protected":false},"author":3,"featured_media":1145769,"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\/1145760"}],"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=1145760"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1145760\/revisions"}],"predecessor-version":[{"id":1145770,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1145760\/revisions\/1145770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1145769"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1145760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1145760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1145760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}