{"id":1119661,"date":"2025-01-08T18:46:46","date_gmt":"2025-01-08T10:46:46","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1119661.html"},"modified":"2025-01-08T18:46:49","modified_gmt":"2025-01-08T10:46:49","slug":"python%e5%a6%82%e4%bd%95%e4%b8%80%e6%ac%a1%e8%be%93%e5%85%a5%e5%a4%9a%e4%b8%aa%e6%95%b0%e5%80%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1119661.html","title":{"rendered":"Python\u5982\u4f55\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082649\/6d735d4c-6d88-498b-9583-8a238c391e7b.webp\" alt=\"Python\u5982\u4f55\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c\" \/><\/p>\n<p><p> <strong>Python\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528split()\u65b9\u6cd5\u3001map()\u51fd\u6570\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u7b49\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528input().split()\u51fd\u6570\u3001map()\u51fd\u6570\u3001\u5217\u8868\u89e3\u6790\u7b49\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u6bcf\u79cd\u65b9\u6cd5\u7684\u4f7f\u7528\u6280\u5de7\u548c\u4f18\u52bf\uff0c\u5e76\u7ed9\u51fa\u5177\u4f53\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528input().split()\u65b9\u6cd5<\/p>\n<p>input().split()\u65b9\u6cd5\u662f\u6700\u5e38\u7528\u7684\u4e00\u79cd\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u7528\u6237\u8f93\u5165\u7684\u591a\u4e2a\u6570\u503c\u6309\u7a7a\u683c\u5206\u9694\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5230\u4e00\u4e2a\u5217\u8868\u4e2d\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>numbers = input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u4ee5\u7a7a\u683c\u5206\u9694: &quot;).split()<\/p>\n<p>print(numbers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u7528\uff0c\u9002\u5408\u5904\u7406\u7b80\u5355\u7684\u8f93\u5165\u573a\u666f\u3002<strong>split()\u65b9\u6cd5\u4f1a\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u6309\u7167\u7a7a\u683c\u5206\u9694\uff0c\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u5404\u4e2a\u6570\u503c\u7684\u5217\u8868\u3002<\/strong>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0csplit()\u65b9\u6cd5\u8fd4\u56de\u7684\u5217\u8868\u4e2d\u7684\u5143\u7d20\u90fd\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5982\u679c\u9700\u8981\u8fdb\u4e00\u6b65\u5904\u7406\u8fd9\u4e9b\u6570\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528map()\u51fd\u6570\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528map()\u51fd\u6570<\/p>\n<p>map()\u51fd\u6570\u53ef\u4ee5\u5c06\u4e00\u4e2a\u51fd\u6570\u5e94\u7528\u5230\u4e00\u4e2a\u53ef\u8fed\u4ee3\u5bf9\u8c61\u7684\u6bcf\u4e2a\u5143\u7d20\u4e0a\uff0c\u4ece\u800c\u5b9e\u73b0\u7c7b\u578b\u8f6c\u6362\u3002\u4f8b\u5982\uff0c\u5c06\u7528\u6237\u8f93\u5165\u7684\u591a\u4e2a\u6570\u503c\u8f6c\u6362\u4e3a\u6574\u6570\u7c7b\u578b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>numbers = list(map(int, input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u4ee5\u7a7a\u683c\u5206\u9694: &quot;).split()))<\/p>\n<p>print(numbers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>map()\u51fd\u6570\u5c06\u8f93\u5165\u7684\u6bcf\u4e2a\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u8fd9\u4e9b\u6574\u6570\u7684\u5217\u8868\u3002<\/strong>\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u5408\u9700\u8981\u5bf9\u8f93\u5165\u7684\u6570\u503c\u8fdb\u884c\u8fdb\u4e00\u6b65\u8ba1\u7b97\u548c\u5904\u7406\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f<\/p>\n<p>\u5217\u8868\u63a8\u5bfc\u5f0f\u662f\u4e00\u79cd\u7b80\u6d01\u7684\u8868\u8fbe\u5f0f\uff0c\u53ef\u4ee5\u7528\u6765\u751f\u6210\u5217\u8868\u3002\u4f8b\u5982\uff0c\u5c06\u7528\u6237\u8f93\u5165\u7684\u591a\u4e2a\u6570\u503c\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u7c7b\u578b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>numbers = [float(x) for x in input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u4ee5\u7a7a\u683c\u5206\u9694: &quot;).split()]<\/p>\n<p>print(numbers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5217\u8868\u63a8\u5bfc\u5f0f\u901a\u8fc7\u904d\u5386\u8f93\u5165\u7684\u6bcf\u4e2a\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff0c\u4ece\u800c\u751f\u6210\u4e00\u4e2a\u5305\u542b\u6d6e\u70b9\u6570\u7684\u5217\u8868\u3002<\/strong>\u8fd9\u79cd\u65b9\u6cd5\u8bed\u6cd5\u7b80\u6d01\uff0c\u9002\u5408\u5bf9\u8f93\u5165\u7684\u6570\u503c\u8fdb\u884c\u7b80\u5355\u7684\u8f6c\u6362\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/p>\n<p>\u5728\u67d0\u4e9b\u590d\u6742\u7684\u8f93\u5165\u573a\u666f\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u63d0\u53d6\u6570\u503c\u3002\u4f8b\u5982\uff0c\u63d0\u53d6\u7528\u6237\u8f93\u5165\u4e2d\u7684\u6240\u6709\u6574\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>import re<\/p>\n<p>numbers = re.findall(r&#39;\\d+&#39;, input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c: &quot;))<\/p>\n<p>numbers = [int(x) for x in numbers]<\/p>\n<p>print(numbers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u7075\u6d3b\u5730\u5339\u914d\u5404\u79cd\u8f93\u5165\u683c\u5f0f\uff0c\u5e76\u63d0\u53d6\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u6570\u503c\u3002<\/strong>\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u5904\u7406\u590d\u6742\u7684\u8f93\u5165\u573a\u666f\uff0c\u4f8b\u5982\u5305\u542b\u7279\u6b8a\u5b57\u7b26\u6216\u591a\u79cd\u5206\u9694\u7b26\u7684\u8f93\u5165\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f7f\u7528sys.stdin.read()\u65b9\u6cd5<\/p>\n<p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u4ece\u6807\u51c6\u8f93\u5165\u4e2d\u8bfb\u53d6\u591a\u884c\u8f93\u5165\u3002\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528sys.stdin.read()\u65b9\u6cd5\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>import sys<\/p>\n<p>data = sys.stdin.read()<\/p>\n<p>numbers = [int(x) for x in data.split()]<\/p>\n<p>print(numbers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>sys.stdin.read()\u65b9\u6cd5\u53ef\u4ee5\u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u4e2d\u7684\u6240\u6709\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5230\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u3002<\/strong>\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u5904\u7406\u591a\u884c\u8f93\u5165\u6216\u5927\u89c4\u6a21\u8f93\u5165\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u7ed3\u5408\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5<\/p>\n<p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u5408\u9002\u7684\u89e3\u51b3\u65b9\u6848\u3002\u4f8b\u5982\uff0c\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u591a\u4e2a\u6570\u503c\uff0c\u5e76\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u8ba1\u7b97\u548c\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>numbers = list(map(int, input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u4ee5\u7a7a\u683c\u5206\u9694: &quot;).split()))<\/p>\n<p>sum_of_numbers = sum(numbers)<\/p>\n<p>average = sum_of_numbers \/ len(numbers)<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u6570\u503c\u4e3a: {numbers}&quot;)<\/p>\n<p>print(f&quot;\u6570\u503c\u4e4b\u548c\u4e3a: {sum_of_numbers}&quot;)<\/p>\n<p>print(f&quot;\u6570\u503c\u5e73\u5747\u503c\u4e3a: {average}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u7ed3\u5408\u4f7f\u7528input().split()\u65b9\u6cd5\u548cmap()\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u591a\u4e2a\u6570\u503c\uff0c\u5e76\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u8ba1\u7b97\u548c\u5904\u7406\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u8f93\u5165\u5f02\u5e38\u60c5\u51b5<\/p>\n<p>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u8f93\u5165\u5f02\u5e38\u7684\u60c5\u51b5\uff0c\u4f8b\u5982\u8f93\u5165\u7684\u6570\u503c\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\u3002\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\u8fdb\u884c\u5f02\u5e38\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u4ee3\u7801<\/p>\n<p>try:<\/p>\n<p>    numbers = list(map(int, input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u4ee5\u7a7a\u683c\u5206\u9694: &quot;).split()))<\/p>\n<p>    sum_of_numbers = sum(numbers)<\/p>\n<p>    average = sum_of_numbers \/ len(numbers)<\/p>\n<p>    print(f&quot;\u8f93\u5165\u7684\u6570\u503c\u4e3a: {numbers}&quot;)<\/p>\n<p>    print(f&quot;\u6570\u503c\u4e4b\u548c\u4e3a: {sum_of_numbers}&quot;)<\/p>\n<p>    print(f&quot;\u6570\u503c\u5e73\u5747\u503c\u4e3a: {average}&quot;)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;\u8f93\u5165\u7684\u6570\u503c\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u4f7f\u7528try-except\u8bed\u53e5\uff0c\u53ef\u4ee5\u6355\u83b7\u8f93\u5165\u5f02\u5e38\u60c5\u51b5\uff0c\u5e76\u7ed9\u51fa\u76f8\u5e94\u7684\u63d0\u793a\u4fe1\u606f\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u516b\u3001\u603b\u7ed3<\/p>\n<p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u5305\u62ec\u4f7f\u7528input().split()\u65b9\u6cd5\u3001map()\u51fd\u6570\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u3001sys.stdin.read()\u65b9\u6cd5\u7b49\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u52bf\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u5408\u9002\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7ed3\u5408\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5e76\u8fdb\u884c\u5f02\u5e38\u5904\u7406\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u8f93\u5165\u573a\u666f\uff0c\u5e76\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u8ba1\u7b97\u548c\u5904\u7406\uff0c\u4ece\u800c\u6ee1\u8db3\u5b9e\u9645\u5e94\u7528\u7684\u9700\u6c42\u3002<\/strong>\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u548c\u5e94\u7528Python\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c\u7684\u65b9\u6cd5\uff0c\u5e76\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u6280\u5de7\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u7ed3\u5408<code>split()<\/code>\u65b9\u6cd5\u6765\u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570\u503c\u3002\u7528\u6237\u53ea\u9700\u5728\u8f93\u5165\u65f6\u7528\u7a7a\u683c\u3001\u9017\u53f7\u6216\u5176\u4ed6\u5206\u9694\u7b26\u9694\u5f00\u6570\u503c\uff0c\u7a0b\u5e8f\u4f1a\u5c06\u5176\u5206\u5272\u6210\u4e00\u4e2a\u5217\u8868\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u7528\u7a7a\u683c\u5206\u5f00: &quot;).split()<\/code>\u5c06\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u4e32\u5217\u8868\uff0c\u60a8\u53ef\u4ee5\u8fdb\u4e00\u6b65\u8f6c\u6362\u4e3a\u6574\u6570\u6216\u6d6e\u70b9\u6570\u5217\u8868\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u4f7f\u7528\u4ec0\u4e48\u65b9\u6cd5\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u503c\u7c7b\u578b\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u7ed3\u5408<code>int()<\/code>\u6216<code>float()<\/code>\u51fd\u6570\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u5217\u8868\u8f6c\u6362\u4e3a\u6570\u503c\u7c7b\u578b\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">numbers = input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u7528\u7a7a\u683c\u5206\u5f00: &quot;).split()\nnumbers = [int(num) for num in numbers]  # \u8f6c\u6362\u4e3a\u6574\u6570\u5217\u8868\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u5c06\u7528\u6237\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u5217\u8868\uff0c\u65b9\u4fbf\u540e\u7eed\u7684\u6570\u503c\u8ba1\u7b97\u3002<\/p>\n<p><strong>\u8f93\u5165\u591a\u4e2a\u6570\u503c\u540e\uff0c\u5982\u4f55\u5bf9\u8fd9\u4e9b\u6570\u503c\u8fdb\u884c\u5904\u7406\u6216\u8ba1\u7b97\uff1f<\/strong><br \/>\u5904\u7406\u8f93\u5165\u7684\u6570\u503c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u5982<code>sum()<\/code>\u8ba1\u7b97\u603b\u548c\uff0c\u6216\u4f7f\u7528<code>max()<\/code>\u548c<code>min()<\/code>\u51fd\u6570\u627e\u5230\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">numbers = [int(num) for num in input(&quot;\u8bf7\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff0c\u7528\u7a7a\u683c\u5206\u5f00: &quot;).split()]\ntotal = sum(numbers)\naverage = total \/ len(numbers)\nprint(f&quot;\u603b\u548c: {total}, \u5e73\u5747\u503c: {average}&quot;)\n<\/code><\/pre>\n<p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u8ba1\u7b97\u8f93\u5165\u6570\u503c\u7684\u603b\u548c\u548c\u5e73\u5747\u503c\uff0c\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u548c\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e00\u6b21\u8f93\u5165\u591a\u4e2a\u6570\u503c\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528split()\u65b9\u6cd5\u3001map()\u51fd\u6570\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u7b49\u3002\u6700\u5e38\u7528\u7684 [&hellip;]","protected":false},"author":3,"featured_media":1119669,"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\/1119661"}],"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=1119661"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119661\/revisions"}],"predecessor-version":[{"id":1119670,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119661\/revisions\/1119670"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1119669"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1119661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1119661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1119661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}