{"id":1088868,"date":"2025-01-08T13:48:14","date_gmt":"2025-01-08T05:48:14","guid":{"rendered":""},"modified":"2025-01-08T13:48:17","modified_gmt":"2025-01-08T05:48:17","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%a4%84%e7%90%86%e6%96%87%e6%9c%ac%e8%a1%8c%e6%95%b0%e5%80%bc-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1088868.html","title":{"rendered":"\u5982\u4f55\u7528python\u5904\u7406\u6587\u672c\u884c\u6570\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24201132\/ba19abd3-4be5-4f6e-b446-c373b781f0b5.webp\" alt=\"\u5982\u4f55\u7528python\u5904\u7406\u6587\u672c\u884c\u6570\u503c\" \/><\/p>\n<p><p> <strong>\u8981\u7528Python\u5904\u7406\u6587\u672c\u884c\u6570\u503c\uff0c\u6838\u5fc3\u89c2\u70b9\u5305\u62ec\uff1a\u8bfb\u53d6\u6587\u4ef6\u3001\u5904\u7406\u6bcf\u884c\u6570\u636e\u3001\u8fdb\u884c\u6570\u503c\u8ba1\u7b97\u3001\u4fdd\u5b58\u7ed3\u679c\u3002<\/strong> \u5176\u4e2d\uff0c\u5904\u7406\u6bcf\u884c\u6570\u636e\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u6b65\u9aa4\uff0c\u5b83\u6d89\u53ca\u5c06\u6587\u672c\u884c\u4e2d\u7684\u6570\u636e\u63d0\u53d6\u51fa\u6765\uff0c\u8fdb\u884c\u76f8\u5e94\u7684\u6570\u503c\u8f6c\u6362\u548c\u5904\u7406\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\u3001\u89e3\u6790\u548c\u5904\u7406\u6bcf\u884c\u6570\u636e\u3001\u8fdb\u884c\u6570\u503c\u8fd0\u7b97\u4ee5\u53ca\u4fdd\u5b58\u5904\u7406\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u8bfb\u53d6\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528Python\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u8bfb\u53d6\u6587\u4ef6\u7684\u65b9\u5f0f\uff0c\u5982\u4f7f\u7528open()\u51fd\u6570\u3001with\u8bed\u53e5\u7b49\u3002\u4f7f\u7528with\u8bed\u53e5\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5728\u4f7f\u7528\u5b8c\u6bd5\u540e\u81ea\u52a8\u5173\u95ed\uff0c\u907f\u514d\u6587\u4ef6\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;data.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    lines = file.readlines()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528open()\u51fd\u6570\u4ee5\u53ea\u8bfb\u6a21\u5f0f\uff08&#39;r&#39;\uff09\u6253\u5f00\u540d\u4e3a&#39;data.txt&#39;\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7readlines()\u65b9\u6cd5\u5c06\u6587\u4ef6\u7684\u6240\u6709\u884c\u8bfb\u53d6\u5230\u4e00\u4e2a\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u5904\u7406\u6bcf\u884c\u6570\u636e<\/p>\n<\/p>\n<p><p>\u8bfb\u53d6\u6587\u4ef6\u540e\uff0c\u6211\u4eec\u9700\u8981\u9010\u884c\u5904\u7406\u6570\u636e\u3002\u901a\u5e38\uff0c\u6587\u672c\u6587\u4ef6\u4e2d\u7684\u6bcf\u884c\u6570\u636e\u53ef\u80fd\u5305\u542b\u6570\u503c\u3001\u5b57\u7b26\u4e32\u6216\u5176\u4ed6\u5206\u9694\u7b26\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528split()\u65b9\u6cd5\u5c06\u6bcf\u884c\u6570\u636e\u6309\u6307\u5b9a\u5206\u9694\u7b26\u62c6\u5206\uff0c\u5e76\u5bf9\u62c6\u5206\u540e\u7684\u6570\u636e\u8fdb\u884c\u6570\u503c\u8f6c\u6362\u548c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for line in lines:<\/p>\n<p>    values = line.strip().split(&#39;,&#39;)<\/p>\n<p>    numbers = [float(value) for value in values]<\/p>\n<p>    # \u5bf9numbers\u8fdb\u884c\u8fdb\u4e00\u6b65\u5904\u7406<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0cstrip()\u65b9\u6cd5\u7528\u4e8e\u53bb\u9664\u884c\u672b\u5c3e\u7684\u6362\u884c\u7b26\u548c\u7a7a\u683c\uff0csplit()\u65b9\u6cd5\u6309\u9017\u53f7\u5206\u9694\u6bcf\u884c\u6570\u636e\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u50a8\u5728values\u5217\u8868\u4e2d\u3002\u63a5\u7740\uff0c\u6211\u4eec\u4f7f\u7528\u5217\u8868\u89e3\u6790\u5c06values\u4e2d\u7684\u6bcf\u4e2a\u503c\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff0c\u5b58\u50a8\u5728numbers\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u8fdb\u884c\u6570\u503c\u8ba1\u7b97<\/p>\n<\/p>\n<p><p>\u5904\u7406\u6bcf\u884c\u6570\u636e\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u6570\u503c\u8fdb\u884c\u5404\u79cd\u8ba1\u7b97\uff0c\u5982\u6c42\u548c\u3001\u5e73\u5747\u503c\u3001\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528Python\u5185\u7f6e\u51fd\u6570\u548c\u5e93\u51fd\u6570\u8fdb\u884c\u8fd9\u4e9b\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for line in lines:<\/p>\n<p>    values = line.strip().split(&#39;,&#39;)<\/p>\n<p>    numbers = [float(value) for value in values]<\/p>\n<p>    total = sum(numbers)<\/p>\n<p>    average = total \/ len(numbers)<\/p>\n<p>    max_value = max(numbers)<\/p>\n<p>    min_value = min(numbers)<\/p>\n<p>    # \u6253\u5370\u6216\u4fdd\u5b58\u8ba1\u7b97\u7ed3\u679c<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5bf9\u6bcf\u884c\u6570\u636e\u8ba1\u7b97\u603b\u548c\u3001\u5e73\u5747\u503c\u3001\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\uff0c\u5e76\u5c06\u7ed3\u679c\u5b58\u50a8\u5728\u76f8\u5e94\u7684\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4fdd\u5b58\u7ed3\u679c<\/p>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5904\u7406\u548c\u8ba1\u7b97\u7ed3\u679c\u4fdd\u5b58\u5230\u65b0\u6587\u4ef6\u4e2d\u3002\u53ef\u4ee5\u4f7f\u7528open()\u51fd\u6570\u4ee5\u5199\u6a21\u5f0f\uff08&#39;w&#39;\uff09\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528write()\u65b9\u6cd5\u5199\u5165\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;results.txt&#39;, &#39;w&#39;) as output_file:<\/p>\n<p>    for line in lines:<\/p>\n<p>        values = line.strip().split(&#39;,&#39;)<\/p>\n<p>        numbers = [float(value) for value in values]<\/p>\n<p>        total = sum(numbers)<\/p>\n<p>        average = total \/ len(numbers)<\/p>\n<p>        max_value = max(numbers)<\/p>\n<p>        min_value = min(numbers)<\/p>\n<p>        result_line = f&#39;Total: {total}, Average: {average}, Max: {max_value}, Min: {min_value}\\n&#39;<\/p>\n<p>        output_file.write(result_line)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5c06\u6bcf\u884c\u6570\u636e\u7684\u8ba1\u7b97\u7ed3\u679c\u683c\u5f0f\u5316\u4e3a\u5b57\u7b26\u4e32\uff0c\u5e76\u5199\u5165\u540d\u4e3a&#39;results.txt&#39;\u7684\u65b0\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\uff0c\u5982\u6587\u4ef6\u4e0d\u5b58\u5728\u3001\u6570\u636e\u683c\u5f0f\u9519\u8bef\u7b49\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\u6765\u6355\u83b7\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    with open(&#39;data.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>        lines = file.readlines()<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    print(&#39;Error: File not found.&#39;)<\/p>\n<p>    exit(1)<\/p>\n<p>for line in lines:<\/p>\n<p>    try:<\/p>\n<p>        values = line.strip().split(&#39;,&#39;)<\/p>\n<p>        numbers = [float(value) for value in values]<\/p>\n<p>    except ValueError:<\/p>\n<p>        print(f&#39;Error: Invalid data format in line: {line}&#39;)<\/p>\n<p>        continue<\/p>\n<p>    total = sum(numbers)<\/p>\n<p>    average = total \/ len(numbers)<\/p>\n<p>    max_value = max(numbers)<\/p>\n<p>    min_value = min(numbers)<\/p>\n<p>    with open(&#39;results.txt&#39;, &#39;a&#39;) as output_file:<\/p>\n<p>        result_line = f&#39;Total: {total}, Average: {average}, Max: {max_value}, Min: {min_value}\\n&#39;<\/p>\n<p>        output_file.write(result_line)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528try-except\u8bed\u53e5\u6355\u83b7\u6587\u4ef6\u6253\u5f00\u65f6\u53ef\u80fd\u51fa\u73b0\u7684FileNotFoundError\u5f02\u5e38\uff0c\u5e76\u5728\u5904\u7406\u6bcf\u884c\u6570\u636e\u65f6\u6355\u83b7ValueError\u5f02\u5e38\uff0c\u786e\u4fdd\u7a0b\u5e8f\u5728\u9047\u5230\u9519\u8bef\u6570\u636e\u65f6\u4e0d\u4f1a\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u5904\u7406\u5927\u578b\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5f53\u5904\u7406\u5927\u578b\u6587\u4ef6\u65f6\uff0c\u4e00\u6b21\u6027\u8bfb\u53d6\u6574\u4e2a\u6587\u4ef6\u53ef\u80fd\u4f1a\u5360\u7528\u5927\u91cf\u5185\u5b58\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u6027\u80fd\u4e0b\u964d\u3002\u6211\u4eec\u53ef\u4ee5\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\uff0c\u51cf\u5c11\u5185\u5b58\u6d88\u8017\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;data.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    for line in file:<\/p>\n<p>        try:<\/p>\n<p>            values = line.strip().split(&#39;,&#39;)<\/p>\n<p>            numbers = [float(value) for value in values]<\/p>\n<p>        except ValueError:<\/p>\n<p>            print(f&#39;Error: Invalid data format in line: {line}&#39;)<\/p>\n<p>            continue<\/p>\n<p>        total = sum(numbers)<\/p>\n<p>        average = total \/ len(numbers)<\/p>\n<p>        max_value = max(numbers)<\/p>\n<p>        min_value = min(numbers)<\/p>\n<p>        with open(&#39;results.txt&#39;, &#39;a&#39;) as output_file:<\/p>\n<p>            result_line = f&#39;Total: {total}, Average: {average}, Max: {max_value}, Min: {min_value}\\n&#39;<\/p>\n<p>            output_file.write(result_line)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528for\u5faa\u73af\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\uff0c\u5e76\u5728\u5904\u7406\u6bcf\u884c\u6570\u636e\u540e\u7acb\u5373\u5c06\u7ed3\u679c\u5199\u5165\u65b0\u6587\u4ef6\uff0c\u51cf\u5c11\u4e86\u5185\u5b58\u5360\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u8fdb\u884c\u6570\u636e\u5904\u7406<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u8bb8\u591a\u5f3a\u5927\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u5982pandas\u3001numpy\u7b49\uff0c\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u7b80\u5316\u6570\u636e\u5904\u7406\u8fc7\u7a0b\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u8bfb\u53d6\u6587\u4ef6<\/strong><\/h2>\n<p>data = pd.read_csv(&#39;data.txt&#39;, header=None)<\/p>\n<h2><strong>\u8ba1\u7b97\u6bcf\u884c\u7684\u603b\u548c\u3001\u5e73\u5747\u503c\u3001\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c<\/strong><\/h2>\n<p>data[&#39;Total&#39;] = data.sum(axis=1)<\/p>\n<p>data[&#39;Average&#39;] = data.mean(axis=1)<\/p>\n<p>data[&#39;Max&#39;] = data.max(axis=1)<\/p>\n<p>data[&#39;Min&#39;] = data.min(axis=1)<\/p>\n<h2><strong>\u4fdd\u5b58\u7ed3\u679c<\/strong><\/h2>\n<p>data.to_csv(&#39;results.txt&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pandas\u5e93\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7\u5185\u7f6e\u65b9\u6cd5\u8ba1\u7b97\u6bcf\u884c\u7684\u603b\u548c\u3001\u5e73\u5747\u503c\u3001\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\uff0c\u6700\u540e\u5c06\u7ed3\u679c\u4fdd\u5b58\u5230\u65b0\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Python\u9ad8\u6548\u5730\u5904\u7406\u6587\u672c\u884c\u6570\u503c\uff0c\u5e76\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u6570\u503c\u8ba1\u7b97\u548c\u7ed3\u679c\u4fdd\u5b58\u3002\u5e0c\u671b\u672c\u6587\u63d0\u4f9b\u7684\u5185\u5bb9\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\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\u4e2d\u7684\u884c\u6570\u503c\uff1f<\/strong><br \/>\u8981\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\u4e2d\u7684\u884c\u6570\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e\u51fd\u6570\u3002\u9996\u5148\uff0c\u6253\u5f00\u6587\u4ef6\u5e76\u9010\u884c\u8bfb\u53d6\u5185\u5bb9\uff0c\u53ef\u4ee5\u4f7f\u7528<code>with open(&#39;filename.txt&#39;) as file:<\/code>\u8bed\u53e5\u3002\u63a5\u7740\uff0c\u5229\u7528<code>file.readlines()<\/code>\u65b9\u6cd5\u5c06\u6bcf\u4e00\u884c\u5b58\u50a8\u5728\u4e00\u4e2a\u5217\u8868\u4e2d\uff0c\u4ece\u800c\u65b9\u4fbf\u540e\u7eed\u5904\u7406\u3002\u53ef\u4ee5\u901a\u8fc7\u5faa\u73af\u904d\u5386\u5217\u8868\uff0c\u63d0\u53d6\u5e76\u8f6c\u6362\u4e3a\u6570\u503c\u7c7b\u578b\uff08\u5982\u6574\u6570\u6216\u6d6e\u70b9\u6570\uff09\uff0c\u4ee5\u4fbf\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u8ba1\u7b97\u6216\u5206\u6790\u3002<\/p>\n<p><strong>\u5728\u5904\u7406\u6587\u672c\u884c\u6570\u503c\u65f6\uff0c\u5982\u4f55\u5904\u7406\u5f02\u5e38\u6570\u636e\uff1f<\/strong><br \/>\u5728\u5904\u7406\u6587\u672c\u884c\u6570\u503c\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u65e0\u6cd5\u8f6c\u6362\u4e3a\u6570\u503c\u7684\u6570\u636e\u3002\u4e3a\u4e86\u5e94\u5bf9\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u5f02\u5e38\u3002\u5728\u5c1d\u8bd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u503c\u65f6\uff0c\u5982\u679c\u53d1\u751f\u9519\u8bef\uff0c\u53ef\u4ee5\u8bb0\u5f55\u8be5\u884c\u5e76\u7ee7\u7eed\u5904\u7406\u5176\u4f59\u6570\u636e\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\uff0c\u540c\u65f6\u907f\u514d\u56e0\u5c11\u6570\u5f02\u5e38\u6570\u636e\u800c\u4e2d\u65ad\u6574\u4e2a\u5904\u7406\u6d41\u7a0b\u3002<\/p>\n<p><strong>\u5982\u4f55\u9ad8\u6548\u7edf\u8ba1\u6587\u672c\u6587\u4ef6\u4e2d\u7684\u6570\u503c\u603b\u548c\u6216\u5e73\u5747\u503c\uff1f<\/strong><br \/>\u8981\u9ad8\u6548\u7edf\u8ba1\u6587\u672c\u6587\u4ef6\u4e2d\u7684\u6570\u503c\u603b\u548c\u6216\u5e73\u5747\u503c\uff0c\u53ef\u4ee5\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\u76f4\u63a5\u8fdb\u884c\u7d2f\u52a0\u8ba1\u7b97\u3002\u5728\u904d\u5386\u6bcf\u4e00\u884c\u65f6\uff0c\u5c06\u6709\u6548\u7684\u6570\u503c\u7d2f\u52a0\u5230\u4e00\u4e2a\u603b\u548c\u53d8\u91cf\u4e2d\uff0c\u5e76\u540c\u65f6\u8bb0\u5f55\u6709\u6548\u6570\u503c\u7684\u6570\u91cf\u3002\u8ba1\u7b97\u5e73\u5747\u503c\u65f6\uff0c\u53ea\u9700\u5c06\u603b\u548c\u9664\u4ee5\u6709\u6548\u6570\u503c\u7684\u6570\u91cf\u5373\u53ef\u3002\u6b64\u65b9\u6cd5\u4e0d\u4ec5\u8282\u7701\u4e86\u5185\u5b58\uff0c\u8fd8\u63d0\u9ad8\u4e86\u5904\u7406\u901f\u5ea6\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406\u5927\u578b\u6587\u672c\u6587\u4ef6\u65f6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u7528Python\u5904\u7406\u6587\u672c\u884c\u6570\u503c\uff0c\u6838\u5fc3\u89c2\u70b9\u5305\u62ec\uff1a\u8bfb\u53d6\u6587\u4ef6\u3001\u5904\u7406\u6bcf\u884c\u6570\u636e\u3001\u8fdb\u884c\u6570\u503c\u8ba1\u7b97\u3001\u4fdd\u5b58\u7ed3\u679c\u3002 \u5176\u4e2d\uff0c\u5904\u7406\u6bcf\u884c [&hellip;]","protected":false},"author":3,"featured_media":1088873,"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\/1088868"}],"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=1088868"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1088868\/revisions"}],"predecessor-version":[{"id":1088876,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1088868\/revisions\/1088876"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1088873"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1088868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1088868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1088868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}