{"id":1145108,"date":"2025-01-08T23:05:28","date_gmt":"2025-01-08T15:05:28","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1145108.html"},"modified":"2025-01-08T23:05:31","modified_gmt":"2025-01-08T15:05:31","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e4%bb%8e%e9%94%ae%e7%9b%98%e8%be%93%e5%85%a5%e4%b8%80%e4%b8%aa%e6%95%b0%e7%bb%84%e8%b5%8b%e5%80%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1145108.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4\u8d4b\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181850\/c7948f06-e281-4c89-a8fc-a0e17a2f6d36.webp\" alt=\"python\u4e2d\u5982\u4f55\u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4\u8d4b\u503c\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4\u5e76\u8d4b\u503c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528 <code>input()<\/code> \u51fd\u6570\u3001\u7ed3\u5408 <code>split()<\/code> \u65b9\u6cd5\u3001\u4ee5\u53ca\u901a\u8fc7\u5217\u8868\u63a8\u5bfc\u5f0f\u7b49\u65b9\u5f0f\u3002<\/strong> \u5176\u4e2d\uff0c\u6700\u7b80\u5355\u548c\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528 <code>input()<\/code> \u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u7136\u540e\u5229\u7528 <code>split()<\/code> \u65b9\u6cd5\u5c06\u8f93\u5165\u5b57\u7b26\u4e32\u5206\u5272\u6210\u5217\u8868\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u5b9e\u9645\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528input()\u51fd\u6570\u548csplit()\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7 <code>input()<\/code> \u51fd\u6570\u548c <code>split()<\/code> \u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u4ece\u952e\u76d8\u8f93\u5165\u4e00\u884c\u6570\u636e\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6570\u7ec4\u3002\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u76f4\u89c2\uff0c\u9002\u7528\u4e8e\u8f93\u5165\u7b80\u5355\u6570\u636e\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4<\/p>\n<p>user_input = input(&quot;\u8bf7\u8f93\u5165\u6570\u7ec4\u5143\u7d20\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<h2><strong>\u4f7f\u7528split()\u65b9\u6cd5\u5c06\u8f93\u5165\u5b57\u7b26\u4e32\u5206\u5272\u4e3a\u5217\u8868<\/strong><\/h2>\n<p>array = user_input.split()<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u6570\u7ec4\u4e3a:&quot;, array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u7ed3\u5408\u5217\u8868\u63a8\u5bfc\u5f0f<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u662fPython\u4e2d\u7684\u4e00\u79cd\u7b80\u6d01\u8bed\u6cd5\uff0c\u53ef\u4ee5\u7528\u4e8e\u751f\u6210\u5217\u8868\u3002\u7ed3\u5408 <code>input()<\/code> \u548c <code>split()<\/code> \u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u76f4\u63a5\u8f6c\u6362\u4e3a\u7279\u5b9a\u7c7b\u578b\u7684\u6570\u7ec4\uff0c\u4f8b\u5982\u6574\u6570\u6570\u7ec4\u6216\u6d6e\u70b9\u6570\u6570\u7ec4\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6574\u6570\u6570\u7ec4<\/p>\n<p>user_input = input(&quot;\u8bf7\u8f93\u5165\u6574\u6570\u6570\u7ec4\u5143\u7d20\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<h2><strong>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u5c06\u5b57\u7b26\u4e32\u5217\u8868\u8f6c\u6362\u4e3a\u6574\u6570\u5217\u8868<\/strong><\/h2>\n<p>int_array = [int(x) for x in user_input.split()]<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u6574\u6570\u6570\u7ec4\u4e3a:&quot;, int_array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/h4>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u901a\u8fc7 <code>input()<\/code> \u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff0c\u5e76\u7528 <code>split()<\/code> \u65b9\u6cd5\u5c06\u5176\u5206\u5272\u6210\u5b57\u7b26\u4e32\u5217\u8868\u3002\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7\u5217\u8868\u63a8\u5bfc\u5f0f <code>[int(x) for x in user_input.split()]<\/code> \u5c06\u5b57\u7b26\u4e32\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u5e76\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u6574\u6570\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528map()\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>map()<\/code> \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\u5e76\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\u3002\u5728\u5904\u7406\u6570\u7ec4\u8f93\u5165\u65f6\uff0c<code>map()<\/code> \u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u5217\u8868\u8f6c\u6362\u4e3a\u7279\u5b9a\u7c7b\u578b\u7684\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6d6e\u70b9\u6570\u6570\u7ec4<\/p>\n<p>user_input = input(&quot;\u8bf7\u8f93\u5165\u6d6e\u70b9\u6570\u6570\u7ec4\u5143\u7d20\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<h2><strong>\u4f7f\u7528map()\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u5217\u8868\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u5217\u8868<\/strong><\/h2>\n<p>float_array = list(map(float, user_input.split()))<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u6d6e\u70b9\u6570\u6570\u7ec4\u4e3a:&quot;, float_array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u591a\u7ef4\u6570\u7ec4\u8f93\u5165<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u591a\u7ef4\u6570\u7ec4\u7684\u8f93\u5165\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u884c\u8f93\u5165\u6216\u4f7f\u7528\u7279\u5b9a\u7684\u5206\u9694\u7b26\u8fdb\u884c\u5904\u7406\u3002\u4ee5\u4e0b\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u901a\u8fc7\u591a\u884c\u8f93\u5165\u83b7\u53d6\u4e8c\u7ef4\u6570\u7ec4\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8f93\u5165\u4e8c\u7ef4\u6570\u7ec4\u7684\u884c\u6570\u548c\u5217\u6570<\/p>\n<p>rows = int(input(&quot;\u8bf7\u8f93\u5165\u4e8c\u7ef4\u6570\u7ec4\u7684\u884c\u6570: &quot;))<\/p>\n<p>cols = int(input(&quot;\u8bf7\u8f93\u5165\u4e8c\u7ef4\u6570\u7ec4\u7684\u5217\u6570: &quot;))<\/p>\n<h2><strong>\u521d\u59cb\u5316\u4e8c\u7ef4\u6570\u7ec4<\/strong><\/h2>\n<p>matrix = []<\/p>\n<h2><strong>\u8f93\u5165\u6bcf\u884c\u7684\u5143\u7d20<\/strong><\/h2>\n<p>for i in range(rows):<\/p>\n<p>    row_input = input(f&quot;\u8bf7\u8f93\u5165\u7b2c {i+1} \u884c\u7684\u5143\u7d20\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<p>    row = list(map(int, row_input.split()))<\/p>\n<p>    matrix.append(row)<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u4e8c\u7ef4\u6570\u7ec4\u4e3a:&quot;)<\/p>\n<p>for row in matrix:<\/p>\n<p>    print(row)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u5e26\u6709\u7279\u5b9a\u5206\u9694\u7b26\u7684\u8f93\u5165<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u8f93\u5165\u6570\u636e\u53ef\u80fd\u4e0d\u662f\u7528\u7a7a\u683c\u5206\u9694\u7684\uff0c\u800c\u662f\u7528\u9017\u53f7\u3001\u5206\u53f7\u7b49\u5176\u4ed6\u5206\u9694\u7b26\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>split()<\/code> \u65b9\u6cd5\u7684\u53c2\u6570\u6765\u6307\u5b9a\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u9017\u53f7\u5206\u9694\u7684\u6574\u6570\u6570\u7ec4<\/p>\n<p>user_input = input(&quot;\u8bf7\u8f93\u5165\u6574\u6570\u6570\u7ec4\u5143\u7d20\uff0c\u7528\u9017\u53f7\u5206\u9694: &quot;)<\/p>\n<h2><strong>\u4f7f\u7528split()\u65b9\u6cd5\u5e76\u6307\u5b9a\u9017\u53f7\u4f5c\u4e3a\u5206\u9694\u7b26<\/strong><\/h2>\n<p>int_array = [int(x) for x in user_input.split(&#39;,&#39;)]<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u9017\u53f7\u5206\u9694\u7684\u6574\u6570\u6570\u7ec4\u4e3a:&quot;, int_array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u5f02\u5e38\u8f93\u5165<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7528\u6237\u8f93\u5165\u53ef\u80fd\u5305\u542b\u65e0\u6548\u6570\u636e\u6216\u683c\u5f0f\u9519\u8bef\u3002\u4e3a\u4e86\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u9700\u8981\u5bf9\u7528\u6237\u8f93\u5165\u8fdb\u884c\u5f02\u5e38\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h4>\u4ee3\u7801\u793a\u4f8b\uff1a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6574\u6570\u6570\u7ec4\uff0c\u5e76\u5904\u7406\u5f02\u5e38\u8f93\u5165<\/p>\n<p>while True:<\/p>\n<p>    try:<\/p>\n<p>        user_input = input(&quot;\u8bf7\u8f93\u5165\u6574\u6570\u6570\u7ec4\u5143\u7d20\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<p>        int_array = [int(x) for x in user_input.split()]<\/p>\n<p>        break<\/p>\n<p>    except ValueError:<\/p>\n<p>        print(&quot;\u8f93\u5165\u5305\u542b\u65e0\u6548\u6570\u636e\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002&quot;)<\/p>\n<p>print(&quot;\u8f93\u5165\u7684\u6574\u6570\u6570\u7ec4\u4e3a:&quot;, int_array)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4ece\u952e\u76d8\u8f93\u5165\u6570\u7ec4\u5e76\u8d4b\u503c\u662fPython\u7f16\u7a0b\u4e2d\u7684\u57fa\u672c\u64cd\u4f5c\u4e4b\u4e00\u3002\u901a\u8fc7 <code>input()<\/code> \u51fd\u6570\u3001<code>split()<\/code> \u65b9\u6cd5\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u548c <code>map()<\/code> \u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5904\u7406\u5404\u79cd\u7c7b\u578b\u7684\u6570\u7ec4\u8f93\u5165\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u5904\u7406\u591a\u7ef4\u6570\u7ec4\u3001\u7279\u5b9a\u5206\u9694\u7b26\u7684\u8f93\u5165\u4ee5\u53ca\u5f02\u5e38\u8f93\u5165\uff0c\u6211\u4eec\u53ef\u4ee5\u7f16\u5199\u51fa\u66f4\u5065\u58ee\u548c\u7075\u6d3b\u7684\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p><strong>\u6838\u5fc3\u5185\u5bb9\u603b\u7ed3\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u548c<code>split()<\/code>\u65b9\u6cd5\u83b7\u53d6\u7528\u6237\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u5217\u8868\u3002<\/strong><\/li>\n<li><strong>\u7ed3\u5408\u5217\u8868\u63a8\u5bfc\u5f0f\u6216<code>map()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u5217\u8868\u8f6c\u6362\u4e3a\u7279\u5b9a\u7c7b\u578b\u7684\u6570\u7ec4\u3002<\/strong><\/li>\n<li><strong>\u5904\u7406\u591a\u7ef4\u6570\u7ec4\u8f93\u5165\u3001\u7279\u5b9a\u5206\u9694\u7b26\u7684\u8f93\u5165\u4ee5\u53ca\u5f02\u5e38\u8f93\u5165\u3002<\/strong><\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\uff0c\u60a8\u53ef\u4ee5\u5728Python\u4e2d\u9ad8\u6548\u5730\u5904\u7406\u4ece\u952e\u76d8\u8f93\u5165\u7684\u6570\u7ec4\uff0c\u5e76\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u7075\u6d3b\u5e94\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4ece\u952e\u76d8\u8f93\u5165\u591a\u4e2a\u503c\u5e76\u5c06\u5176\u5b58\u50a8\u4e3a\u6570\u7ec4\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>input()<\/code>\u51fd\u6570\u6765\u4ece\u952e\u76d8\u83b7\u53d6\u8f93\u5165\u3002\u82e5\u5e0c\u671b\u7528\u6237\u8f93\u5165\u591a\u4e2a\u6570\u503c\u5e76\u5c06\u5176\u5b58\u50a8\u4e3a\u6570\u7ec4\uff0c\u53ef\u4ee5\u5148\u63d0\u793a\u7528\u6237\u8f93\u5165\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u4f7f\u7528<code>split()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u5206\u5272\u6210\u591a\u4e2a\u90e8\u5206\uff0c\u6700\u540e\u5c06\u5176\u8f6c\u6362\u4e3a\u6240\u9700\u7684\u6570\u503c\u7c7b\u578b\uff0c\u4f8b\u5982\u6574\u578b\u6216\u6d6e\u70b9\u578b\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">user_input = input(&quot;\u8bf7\u8f93\u5165\u6570\u7ec4\u5143\u7d20\uff0c\u4ee5\u7a7a\u683c\u5206\u9694\uff1a&quot;)\narray = list(map(int, user_input.split()))\nprint(array)\n<\/code><\/pre>\n<p><strong>\u53ef\u4ee5\u8f93\u5165\u975e\u6574\u6570\u7c7b\u578b\u7684\u6570\u7ec4\u5417\uff1f<\/strong><br \/>\u5f53\u7136\u53ef\u4ee5\u3002\u53ea\u9700\u5728<code>map()<\/code>\u51fd\u6570\u4e2d\u66f4\u6539\u7c7b\u578b\u8f6c\u6362\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u8f93\u5165\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u5c06<code>int<\/code>\u66ff\u6362\u4e3a<code>float<\/code>\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code class=\"language-python\">user_input = input(&quot;\u8bf7\u8f93\u5165\u6570\u7ec4\u5143\u7d20\uff0c\u4ee5\u7a7a\u683c\u5206\u9694\uff1a&quot;)\narray = list(map(float, user_input.split()))\nprint(array)\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u7528\u6237\u8f93\u5165\u65f6\u53ef\u80fd\u4f1a\u51fa\u73b0\u9519\u8bef\uff0c\u4f8b\u5982\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\u3002\u4e3a\u6b64\uff0c\u53ef\u4ee5\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u6765\u6355\u83b7\u5e76\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u5b89\u5168\u5730\u83b7\u53d6\u7528\u6237\u8f93\u5165\u5e76\u5904\u7406\u5f02\u5e38\uff1a<\/p>\n<pre><code class=\"language-python\">try:\n    user_input = input(&quot;\u8bf7\u8f93\u5165\u6570\u7ec4\u5143\u7d20\uff0c\u4ee5\u7a7a\u683c\u5206\u9694\uff1a&quot;)\n    array = list(map(int, user_input.split()))\n    print(array)\nexcept ValueError:\n    print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u786e\u4fdd\u8f93\u5165\u7684\u662f\u6570\u5b57\uff0c\u5e76\u4ee5\u7a7a\u683c\u5206\u9694\u3002&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u4fdd\u8bc1\u7a0b\u5e8f\u4e0d\u4f1a\u56e0\u4e3a\u7528\u6237\u7684\u9519\u8bef\u8f93\u5165\u800c\u5d29\u6e83\uff0c\u5e76\u4e14\u80fd\u591f\u7ed9\u4e88\u7528\u6237\u660e\u786e\u7684\u53cd\u9988\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u4ece\u952e\u76d8\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4\u5e76\u8d4b\u503c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528 input() \u51fd\u6570\u3001\u7ed3\u5408 split( [&hellip;]","protected":false},"author":3,"featured_media":1145121,"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\/1145108"}],"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=1145108"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1145108\/revisions"}],"predecessor-version":[{"id":1145124,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1145108\/revisions\/1145124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1145121"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1145108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1145108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1145108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}