{"id":1141752,"date":"2025-01-08T22:33:50","date_gmt":"2025-01-08T14:33:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1141752.html"},"modified":"2025-01-08T22:33:53","modified_gmt":"2025-01-08T14:33:53","slug":"%e7%bb%99%e5%88%97%e8%a1%a8%e6%b1%82%e5%92%8c%e5%a6%82%e4%bd%95%e5%8a%a0%e4%b8%80%e4%b8%aa%e6%95%b0python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1141752.html","title":{"rendered":"\u7ed9\u5217\u8868\u6c42\u548c\u5982\u4f55\u52a0\u4e00\u4e2a\u6570python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25104404\/812326de-4a95-44cb-b24c-5174bb76466d.webp\" alt=\"\u7ed9\u5217\u8868\u6c42\u548c\u5982\u4f55\u52a0\u4e00\u4e2a\u6570python\" \/><\/p>\n<p><p> <strong>\u7ed9\u5217\u8868\u6c42\u548c\u5982\u4f55\u52a0\u4e00\u4e2a\u6570python<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u5728Python\u4e2d\u7ed9\u4e00\u4e2a\u5217\u8868\u6c42\u548c\u5e76\u52a0\u4e0a\u4e00\u4e2a\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u548c\u7b80\u5355\u7684\u7b97\u672f\u64cd\u4f5c\u6765\u5b8c\u6210\u3002<strong>\u9996\u5148\uff0c\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>sum()<\/code>\u5bf9\u5217\u8868\u4e2d\u7684\u6240\u6709\u5143\u7d20\u6c42\u548c\u3001\u7136\u540e\u5c06\u8fd9\u4e2a\u548c\u4e0e\u9700\u8981\u52a0\u4e0a\u7684\u6570\u76f8\u52a0<\/strong>\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u5217\u8868<code>[1, 2, 3, 4]<\/code>\uff0c\u5e76\u4e14\u9700\u8981\u52a0\u4e0a\u4e00\u4e2a\u6570<code>5<\/code>\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4]<\/p>\n<p>extra_number = 5<\/p>\n<p>total_sum = sum(my_list) + extra_number<\/p>\n<p>print(total_sum)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>sum(my_list)<\/code>\u4f1a\u8ba1\u7b97\u51fa<code>10<\/code>\uff0c\u7136\u540e\u518d\u52a0\u4e0a<code>5<\/code>\uff0c\u6700\u7ec8\u7ed3\u679c\u662f<code>15<\/code>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u8fd9\u4e00\u8fc7\u7a0b\uff0c\u4ee5\u53ca\u6269\u5c55\u548c\u4f18\u5316\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001Python\u4e2d\u7684\u5217\u8868\u4e0e\u6c42\u548c<\/h3>\n<\/p>\n<p><h4>1\u3001\u5217\u8868\u7684\u57fa\u7840\u6982\u5ff5<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5217\u8868\u662f\u4e00\u79cd\u7528\u4e8e\u5b58\u50a8\u591a\u4e2a\u9879\u76ee\u7684\u6709\u5e8f\u96c6\u5408\u3002\u5217\u8868\u5141\u8bb8\u5305\u542b\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\uff0c\u5982\u6574\u6570\u3001\u5b57\u7b26\u4e32\u3001\u6d6e\u70b9\u6570\u7b49\u3002\u5217\u8868\u7684\u521b\u5efa\u548c\u57fa\u672c\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u5217\u8868<\/p>\n<p>my_list = [1, 2, 3, 4, 5]<\/p>\n<h2><strong>\u8bbf\u95ee\u5217\u8868\u5143\u7d20<\/strong><\/h2>\n<p>print(my_list[0])  # \u8f93\u51fa\uff1a1<\/p>\n<p>print(my_list[-1])  # \u8f93\u51fa\uff1a5<\/p>\n<h2><strong>\u5217\u8868\u5207\u7247<\/strong><\/h2>\n<p>print(my_list[1:3])  # \u8f93\u51fa\uff1a[2, 3]<\/p>\n<h2><strong>\u4fee\u6539\u5217\u8868\u5143\u7d20<\/strong><\/h2>\n<p>my_list[2] = 10<\/p>\n<p>print(my_list)  # \u8f93\u51fa\uff1a[1, 2, 10, 4, 5]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528sum()\u51fd\u6570\u6c42\u548c<\/h4>\n<\/p>\n<p><p>Python\u5185\u7f6e\u7684<code>sum()<\/code>\u51fd\u6570\u7528\u4e8e\u5bf9\u5217\u8868\u4e2d\u7684\u5143\u7d20\u6c42\u548c\uff0c\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">sum(iterable, start)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ul>\n<li><code>iterable<\/code>\uff1a\u53ef\u4ee5\u662f\u5217\u8868\u3001\u5143\u7ec4\u7b49\u53ef\u8fed\u4ee3\u5bf9\u8c61\u3002<\/li>\n<li><code>start<\/code>\uff1a\u53ef\u9009\u53c2\u6570\uff0c\u6307\u5b9a\u4ece\u54ea\u4e2a\u503c\u5f00\u59cb\u6c42\u548c\uff0c\u9ed8\u8ba4\u503c\u4e3a<code>0<\/code>\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>total_sum = sum(my_list)<\/p>\n<p>print(total_sum)  # \u8f93\u51fa\uff1a15<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u5728\u5217\u8868\u603b\u548c\u57fa\u7840\u4e0a\u52a0\u4e00\u4e2a\u6570<\/h3>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u524d\u9762\u63d0\u5230\u7684\u57fa\u7840\u4e0a\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u989d\u5916\u7684\u6570\u4e0e\u6c42\u548c\u7ed3\u679c\u76f8\u52a0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>extra_number = 5<\/p>\n<p>total_sum = sum(my_list) + extra_number<\/p>\n<p>print(total_sum)  # \u8f93\u51fa\uff1a20<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u51fd\u6570\u5c01\u88c5<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u590d\u7528\u6027\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e00\u8fc7\u7a0b\u5c01\u88c5\u5230\u4e00\u4e2a\u51fd\u6570\u4e2d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def sum_and_add_extra(lst, extra):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    \u8ba1\u7b97\u5217\u8868\u603b\u548c\u5e76\u52a0\u4e0a\u989d\u5916\u7684\u6570<\/p>\n<p>    :param lst: \u9700\u8981\u6c42\u548c\u7684\u5217\u8868<\/p>\n<p>    :param extra: \u9700\u8981\u52a0\u4e0a\u7684\u989d\u5916\u6570<\/p>\n<p>    :return: \u6700\u7ec8\u7ed3\u679c<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    return sum(lst) + extra<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>my_list = [1, 2, 3, 4, 5]<\/p>\n<p>extra_number = 5<\/p>\n<p>result = sum_and_add_extra(my_list, extra_number)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1a20<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f18\u5316\u4e0e\u6269\u5c55<\/h3>\n<\/p>\n<p><h4>1\u3001\u9519\u8bef\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5217\u8868\u4e3a\u7a7a\u6216\u5305\u542b\u975e\u6570\u503c\u5143\u7d20\u7684\u60c5\u51b5\u3002\u4e3a\u4e86\u63d0\u9ad8\u51fd\u6570\u7684\u5065\u58ee\u6027\uff0c\u9700\u8981\u6dfb\u52a0\u9519\u8bef\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def sum_and_add_extra(lst, extra):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    \u8ba1\u7b97\u5217\u8868\u603b\u548c\u5e76\u52a0\u4e0a\u989d\u5916\u7684\u6570\uff0c\u5305\u542b\u9519\u8bef\u5904\u7406<\/p>\n<p>    :param lst: \u9700\u8981\u6c42\u548c\u7684\u5217\u8868<\/p>\n<p>    :param extra: \u9700\u8981\u52a0\u4e0a\u7684\u989d\u5916\u6570<\/p>\n<p>    :return: \u6700\u7ec8\u7ed3\u679c<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    try:<\/p>\n<p>        total_sum = sum(lst)<\/p>\n<p>    except TypeError:<\/p>\n<p>        r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se ValueError(&quot;\u5217\u8868\u4e2d\u5305\u542b\u975e\u6570\u503c\u5143\u7d20&quot;)<\/p>\n<p>    return total_sum + extra<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>my_list = [1, 2, 3, &#39;a&#39;, 5]<\/p>\n<p>extra_number = 5<\/p>\n<p>try:<\/p>\n<p>    result = sum_and_add_extra(my_list, extra_number)<\/p>\n<p>    print(result)<\/p>\n<p>except ValueError as e:<\/p>\n<p>    print(e)  # \u8f93\u51fa\uff1a\u5217\u8868\u4e2d\u5305\u542b\u975e\u6570\u503c\u5143\u7d20<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6027\u80fd\u4f18\u5316<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u975e\u5e38\u5927\u7684\u5217\u8868\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u6765\u4f18\u5316\u6027\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def sum_and_add_extra(lst, extra):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    \u8ba1\u7b97\u5217\u8868\u603b\u548c\u5e76\u52a0\u4e0a\u989d\u5916\u7684\u6570\uff0c\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u4f18\u5316\u6027\u80fd<\/p>\n<p>    :param lst: \u9700\u8981\u6c42\u548c\u7684\u5217\u8868<\/p>\n<p>    :param extra: \u9700\u8981\u52a0\u4e0a\u7684\u989d\u5916\u6570<\/p>\n<p>    :return: \u6700\u7ec8\u7ed3\u679c<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    try:<\/p>\n<p>        total_sum = sum(x for x in lst if isinstance(x, (int, float)))<\/p>\n<p>    except TypeError:<\/p>\n<p>        raise ValueError(&quot;\u5217\u8868\u4e2d\u5305\u542b\u975e\u6570\u503c\u5143\u7d20&quot;)<\/p>\n<p>    return total_sum + extra<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>my_list = [1, 2, 3, 4, 5]<\/p>\n<p>extra_number = 5<\/p>\n<p>result = sum_and_add_extra(my_list, extra_number)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1a20<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><h4>1\u3001\u5904\u7406\u8d22\u52a1\u6570\u636e<\/h4>\n<\/p>\n<p><p>\u5728\u8d22\u52a1\u6570\u636e\u5904\u7406\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5bf9\u4e00\u7ec4\u6570\u5b57\u6c42\u548c\u5e76\u52a0\u4e0a\u67d0\u4e2a\u8c03\u6574\u6570\u3002\u4f8b\u5982\uff0c\u8ba1\u7b97\u603b\u6536\u5165\u5e76\u52a0\u4e0a\u7a0e\u6536\u6216\u4f18\u60e0\u91d1\u989d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def calculate_total_income(incomes, adjustment):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    \u8ba1\u7b97\u603b\u6536\u5165\u5e76\u52a0\u4e0a\u8c03\u6574\u91d1\u989d<\/p>\n<p>    :param incomes: \u6536\u5165\u5217\u8868<\/p>\n<p>    :param adjustment: \u8c03\u6574\u91d1\u989d<\/p>\n<p>    :return: \u6700\u7ec8\u603b\u6536\u5165<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    return sum_and_add_extra(incomes, adjustment)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>monthly_incomes = [3000, 4000, 5000, 6000]<\/p>\n<p>tax_adjustment = 500<\/p>\n<p>total_income = calculate_total_income(monthly_incomes, tax_adjustment)<\/p>\n<p>print(total_income)  # \u8f93\u51fa\uff1a18500<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5904\u7406\u5b66\u751f\u6210\u7ee9<\/h4>\n<\/p>\n<p><p>\u5728\u5b66\u751f\u6210\u7ee9\u5904\u7406\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u4e00\u7ec4\u6210\u7ee9\u6c42\u548c\u5e76\u52a0\u4e0a\u67d0\u4e2a\u9644\u52a0\u5206\u3002\u4f8b\u5982\uff0c\u8ba1\u7b97\u603b\u5206\u6570\u5e76\u52a0\u4e0a\u5956\u52b1\u5206\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def calculate_total_score(scores, bonus):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    \u8ba1\u7b97\u603b\u5206\u6570\u5e76\u52a0\u4e0a\u5956\u52b1\u5206\u6570<\/p>\n<p>    :param scores: \u6210\u7ee9\u5217\u8868<\/p>\n<p>    :param bonus: \u5956\u52b1\u5206\u6570<\/p>\n<p>    :return: \u6700\u7ec8\u603b\u5206\u6570<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    return sum_and_add_extra(scores, bonus)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>student_scores = [80, 85, 90, 95]<\/p>\n<p>bonus_points = 10<\/p>\n<p>total_score = calculate_total_score(student_scores, bonus_points)<\/p>\n<p>print(total_score)  # \u8f93\u51fa\uff1a360<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Python\u4e2d\u7ed9\u5217\u8868\u6c42\u548c\u5e76\u52a0\u4e0a\u4e00\u4e2a\u6570\u3002<strong>\u901a\u8fc7\u4f7f\u7528<code>sum()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5bf9\u5217\u8868\u4e2d\u7684\u5143\u7d20\u6c42\u548c\uff0c\u518d\u52a0\u4e0a\u9700\u8981\u7684\u6570\u5373\u53ef<\/strong>\u3002\u6211\u4eec\u8fd8\u63a2\u8ba8\u4e86\u5982\u4f55\u5c01\u88c5\u6210\u51fd\u6570\u3001\u6dfb\u52a0\u9519\u8bef\u5904\u7406\u4ee5\u53ca\u4f18\u5316\u6027\u80fd\u3002\u6700\u540e\uff0c\u4ecb\u7ecd\u4e86\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4e00\u4e9b\u573a\u666f\uff0c\u5982\u5904\u7406\u8d22\u52a1\u6570\u636e\u548c\u5b66\u751f\u6210\u7ee9\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5e2e\u52a9\u4f60\u5728\u5b9e\u9645\u7f16\u7a0b\u4e2d\u66f4\u597d\u5730\u5904\u7406\u7c7b\u4f3c\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u7ed9\u5217\u8868\u4e2d\u7684\u6240\u6709\u5143\u7d20\u52a0\u4e0a\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u5b9e\u73b0\u5c06\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u52a0\u5230\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u4e0a\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u6709\u4e00\u4e2a\u5217\u8868<code>my_list<\/code>\u548c\u4e00\u4e2a\u8981\u52a0\u7684\u6570<code>n<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5b9e\u73b0\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [1, 2, 3, 4]\nn = 5\nresult = [x + n for x in my_list]\nprint(result)  # \u8f93\u51fa: [6, 7, 8, 9]\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u6d01\uff0c\u800c\u4e14\u6613\u4e8e\u7406\u89e3\u3002<\/p>\n<p><strong>\u4f7f\u7528NumPy\u5e93\u80fd\u5426\u66f4\u9ad8\u6548\u5730\u7ed9\u5217\u8868\u52a0\u4e0a\u4e00\u4e2a\u6570\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u4f7f\u7528NumPy\u5e93\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u5904\u7406\u5927\u578b\u6570\u7ec4\u6216\u5217\u8868\u3002NumPy\u5141\u8bb8\u5bf9\u6574\u4e2a\u6570\u7ec4\u8fdb\u884c\u64cd\u4f5c\uff0c\u800c\u4e0d\u9700\u8981\u4f7f\u7528\u5faa\u73af\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy as np\n\nmy_array = np.array([1, 2, 3, 4])\nn = 5\nresult = my_array + n\nprint(result)  # \u8f93\u51fa: [6 7 8 9]\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u5728\u5904\u7406\u5927\u6570\u636e\u65f6\u4f1a\u663e\u8457\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u5305\u542b\u975e\u6570\u5b57\u5143\u7d20\u7684\u5217\u8868\u52a0\u6570\u64cd\u4f5c\uff1f<\/strong><br \/>\u5982\u679c\u5217\u8868\u4e2d\u5305\u542b\u975e\u6570\u5b57\u5143\u7d20\uff0c\u76f4\u63a5\u52a0\u6570\u4f1a\u5f15\u53d1\u9519\u8bef\u3002\u53ef\u4ee5\u4f7f\u7528\u6761\u4ef6\u8bed\u53e5\u6765\u8fc7\u6ee4\u975e\u6570\u5b57\u5143\u7d20\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [1, &#39;two&#39;, 3, 4]\nn = 5\nresult = [(x + n) if isinstance(x, (int, float)) else x for x in my_list]\nprint(result)  # \u8f93\u51fa: [6, &#39;two&#39;, 8, 9]\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u786e\u4fdd\u53ea\u6709\u6570\u5b57\u5143\u7d20\u88ab\u52a0\u4e0a\u7279\u5b9a\u7684\u6570\uff0c\u800c\u5176\u4ed6\u5143\u7d20\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7ed9\u5217\u8868\u6c42\u548c\u5982\u4f55\u52a0\u4e00\u4e2a\u6570python \u8981\u5728Python\u4e2d\u7ed9\u4e00\u4e2a\u5217\u8868\u6c42\u548c\u5e76\u52a0\u4e0a\u4e00\u4e2a\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u548c\u7b80\u5355\u7684\u7b97\u672f [&hellip;]","protected":false},"author":3,"featured_media":1141763,"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\/1141752"}],"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=1141752"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1141752\/revisions"}],"predecessor-version":[{"id":1141766,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1141752\/revisions\/1141766"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1141763"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1141752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1141752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1141752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}