{"id":1095193,"date":"2025-01-08T14:48:42","date_gmt":"2025-01-08T06:48:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1095193.html"},"modified":"2025-01-08T14:48:44","modified_gmt":"2025-01-08T06:48:44","slug":"python%e5%a6%82%e4%bd%95%e8%be%93%e5%85%a5%e4%b8%89%e4%b8%aa%e6%95%b0-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1095193.html","title":{"rendered":"python\u5982\u4f55\u8f93\u5165\u4e09\u4e2a\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210942\/c9b9c3ce-15de-429c-946f-d131e9487525.webp\" alt=\"python\u5982\u4f55\u8f93\u5165\u4e09\u4e2a\u6570\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528 Python \u8f93\u5165\u4e09\u4e2a\u6570\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u901a\u8fc7 input() \u51fd\u6570\u3001\u547d\u4ee4\u884c\u53c2\u6570\u3001\u6587\u4ef6\u8bfb\u53d6\u7b49\u3002<\/strong> \u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528 input() \u51fd\u6570\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u5b9e\u73b0\u8fd9\u4e00\u64cd\u4f5c\uff0c\u4ee5\u53ca\u4e00\u4e9b\u76f8\u5173\u7684\u6ce8\u610f\u4e8b\u9879\u548c\u8fdb\u9636\u7528\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528 input() \u51fd\u6570<\/p>\n<\/p>\n<p><p>\u5728 Python \u4e2d\uff0cinput() \u51fd\u6570\u7528\u4e8e\u4ece\u7528\u6237\u8f93\u5165\u8bfb\u53d6\u5b57\u7b26\u4e32\u3002\u901a\u8fc7\u8c03\u7528\u4e09\u6b21 input() \u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u8bfb\u53d6\u4e09\u4e2a\u6570\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bfb\u53d6\u4e09\u4e2a\u6570<\/p>\n<p>num1 = input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e00\u4e2a\u6570: &quot;)<\/p>\n<p>num2 = input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e8c\u4e2a\u6570: &quot;)<\/p>\n<p>num3 = input(&quot;\u8bf7\u8f93\u5165\u7b2c\u4e09\u4e2a\u6570: &quot;)<\/p>\n<h2><strong>\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/strong><\/h2>\n<p>num1 = int(num1)<\/p>\n<p>num2 = int(num2)<\/p>\n<p>num3 = int(num3)<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e09\u6b21 input() \u51fd\u6570\u6765\u8bfb\u53d6\u4e09\u4e2a\u6570\uff0c\u5e76\u5c06\u5b83\u4eec\u4ece\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u8fdb\u884c\u5904\u7406\u3002<strong>\u8fd9\u4e00\u65b9\u6cd5\u7b80\u5355\u6613\u61c2\uff0c\u9002\u5408\u521d\u5b66\u8005<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570<\/p>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u6211\u4eec\u5e0c\u671b\u7528\u6237\u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570\uff0c\u5e76\u901a\u8fc7\u62c6\u5206\u5b57\u7b26\u4e32\u6765\u83b7\u53d6\u8fd9\u4e9b\u6570\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u7528\u6237\u5728\u4e00\u884c\u4e2d\u8f93\u5165\u4e09\u4e2a\u6570\uff0c\u7528\u7a7a\u683c\u5206\u9694\uff0c\u7136\u540e\u8fdb\u884c\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570<\/p>\n<p>numbers = input(&quot;\u8bf7\u8f93\u5165\u4e09\u4e2a\u6570\uff0c\u7528\u7a7a\u683c\u5206\u9694: &quot;)<\/p>\n<h2><strong>\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u6309\u7a7a\u683c\u5206\u5272\u6210\u5217\u8868<\/strong><\/h2>\n<p>num_list = numbers.split()<\/p>\n<h2><strong>\u5c06\u5217\u8868\u4e2d\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/strong><\/h2>\n<p>num1 = int(num_list[0])<\/p>\n<p>num2 = int(num_list[1])<\/p>\n<p>num3 = int(num_list[2])<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u66f4\u4e3a\u7b80\u6d01\uff0c\u9002\u5408\u5904\u7406\u7b80\u5355\u7684\u8f93\u5165\u9700\u6c42<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u5e94\u7528\u573a\u666f\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570\u4f20\u9012\u8f93\u5165\u3002\u6b64\u65b9\u6cd5\u901a\u5e38\u7528\u4e8e\u811a\u672c\u548c\u81ea\u52a8\u5316\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\u9700\u8981\u5bfc\u5165 sys \u6a21\u5757\uff0c\u7136\u540e\u4f7f\u7528 sys.argv \u5217\u8868\u6765\u83b7\u53d6\u547d\u4ee4\u884c\u53c2\u6570\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<h2><strong>\u68c0\u67e5\u547d\u4ee4\u884c\u53c2\u6570\u7684\u6570\u91cf<\/strong><\/h2>\n<p>if len(sys.argv) != 4:<\/p>\n<p>    print(&quot;\u8bf7\u4f20\u5165\u4e09\u4e2a\u6570\u4f5c\u4e3a\u53c2\u6570&quot;)<\/p>\n<p>    sys.exit(1)<\/p>\n<h2><strong>\u83b7\u53d6\u547d\u4ee4\u884c\u53c2\u6570<\/strong><\/h2>\n<p>num1 = int(sys.argv[1])<\/p>\n<p>num2 = int(sys.argv[2])<\/p>\n<p>num3 = int(sys.argv[3])<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u9700\u8981\u4ece\u547d\u4ee4\u884c\u8fd0\u884c\u7684\u811a\u672c\uff0c\u7279\u522b\u662f\u5728\u81ea\u52a8\u5316\u4efb\u52a1\u548c\u6279\u5904\u7406\u811a\u672c\u4e2d\u975e\u5e38\u6709\u7528<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4ece\u6587\u4ef6\u8bfb\u53d6\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u8f93\u5165\u3002\u9996\u5148\u9700\u8981\u6253\u5f00\u6587\u4ef6\uff0c\u8bfb\u53d6\u5185\u5bb9\u5e76\u8fdb\u884c\u5904\u7406\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5047\u8bbe\u8f93\u5165\u4fdd\u5b58\u5728\u4e00\u4e2a\u540d\u4e3a input.txt \u7684\u6587\u4ef6\u4e2d\uff0c\u6bcf\u884c\u4e00\u4e2a\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u6253\u5f00\u6587\u4ef6\u5e76\u8bfb\u53d6\u5185\u5bb9<\/p>\n<p>with open(&#39;input.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    lines = file.readlines()<\/p>\n<h2><strong>\u786e\u4fdd\u6587\u4ef6\u4e2d\u6709\u8db3\u591f\u7684\u884c<\/strong><\/h2>\n<p>if len(lines) &lt; 3:<\/p>\n<p>    print(&quot;\u6587\u4ef6\u4e2d\u6ca1\u6709\u8db3\u591f\u7684\u6570&quot;)<\/p>\n<p>    sys.exit(1)<\/p>\n<h2><strong>\u5c06\u6bcf\u884c\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/strong><\/h2>\n<p>num1 = int(lines[0].strip())<\/p>\n<p>num2 = int(lines[1].strip())<\/p>\n<p>num3 = int(lines[2].strip())<\/p>\n<p>print(f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u9002\u5408\u9700\u8981\u5904\u7406\u5927\u91cf\u6570\u636e\u6216\u4ece\u5916\u90e8\u6587\u4ef6\u83b7\u53d6\u8f93\u5165\u7684\u5e94\u7528\u573a\u666f<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f7f\u7528\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u901a\u8fc7\u56fe\u5f62\u7528\u6237\u754c\u9762\u83b7\u53d6\u8f93\u5165\u3002\u4f7f\u7528 Tkinter \u5e93\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>from tkinter import simpledialog<\/p>\n<p>def get_input():<\/p>\n<p>    root = tk.Tk()<\/p>\n<p>    root.withdraw()  # \u9690\u85cf\u4e3b\u7a97\u53e3<\/p>\n<p>    num1 = simpledialog.askinteger(&quot;\u8f93\u5165&quot;, &quot;\u8bf7\u8f93\u5165\u7b2c\u4e00\u4e2a\u6570:&quot;)<\/p>\n<p>    num2 = simpledialog.askinteger(&quot;\u8f93\u5165&quot;, &quot;\u8bf7\u8f93\u5165\u7b2c\u4e8c\u4e2a\u6570:&quot;)<\/p>\n<p>    num3 = simpledialog.askinteger(&quot;\u8f93\u5165&quot;, &quot;\u8bf7\u8f93\u5165\u7b2c\u4e09\u4e2a\u6570:&quot;)<\/p>\n<p>    print(f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;)<\/p>\n<p>get_input()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u9700\u8981\u7528\u6237\u53cb\u597d\u754c\u9762\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u4ece\u7f51\u7edc\u83b7\u53d6\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u5728\u7f51\u7edc\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4ece\u7f51\u9875\u6216 API \u83b7\u53d6\u8f93\u5165\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u4f7f\u7528 Flask \u521b\u5efa\u4e00\u4e2a\u7f51\u9875\u8868\u5355\uff0c\u4f9b\u7528\u6237\u8f93\u5165\u4e09\u4e2a\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, request, render_template_string<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>html_form = &#39;&#39;&#39;<\/p>\n<p>    &lt;form method=&quot;post&quot;&gt;<\/p>\n<p>        \u7b2c\u4e00\u4e2a\u6570: &lt;input type=&quot;number&quot; name=&quot;num1&quot;&gt;&lt;br&gt;<\/p>\n<p>        \u7b2c\u4e8c\u4e2a\u6570: &lt;input type=&quot;number&quot; name=&quot;num2&quot;&gt;&lt;br&gt;<\/p>\n<p>        \u7b2c\u4e09\u4e2a\u6570: &lt;input type=&quot;number&quot; name=&quot;num3&quot;&gt;&lt;br&gt;<\/p>\n<p>        &lt;input type=&quot;submit&quot; value=&quot;\u63d0\u4ea4&quot;&gt;<\/p>\n<p>    &lt;\/form&gt;<\/p>\n<p>&#39;&#39;&#39;<\/p>\n<p>@app.route(&#39;\/&#39;, methods=[&#39;GET&#39;, &#39;POST&#39;])<\/p>\n<p>def index():<\/p>\n<p>    if request.method == &#39;POST&#39;:<\/p>\n<p>        num1 = int(request.form[&#39;num1&#39;])<\/p>\n<p>        num2 = int(request.form[&#39;num2&#39;])<\/p>\n<p>        num3 = int(request.form[&#39;num3&#39;])<\/p>\n<p>        return f&quot;\u8f93\u5165\u7684\u4e09\u4e2a\u6570\u5206\u522b\u662f: {num1}, {num2}, {num3}&quot;<\/p>\n<p>    return render_template_string(html_form)<\/p>\n<p>if __name__ == &#39;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u5f00\u53d1\u9700\u8981\u7528\u6237\u901a\u8fc7\u7f51\u9875\u8f93\u5165\u6570\u636e\u7684\u7f51\u7edc\u5e94\u7528<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528 input() \u51fd\u6570<\/strong> \u662f\u6700\u5e38\u89c1\u548c\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u9002\u5408\u521d\u5b66\u8005\uff1b<\/p>\n<p><strong>\u4e00\u6b21\u6027\u8f93\u5165\u591a\u4e2a\u6570<\/strong> \u5219\u80fd\u7b80\u5316\u7528\u6237\u64cd\u4f5c\uff0c\u9002\u5408\u5904\u7406\u7b80\u5355\u7684\u8f93\u5165\u9700\u6c42\uff1b<\/p>\n<p><strong>\u547d\u4ee4\u884c\u53c2\u6570\u8f93\u5165<\/strong> \u9002\u5408\u811a\u672c\u548c\u81ea\u52a8\u5316\u4efb\u52a1\uff1b<\/p>\n<p><strong>\u4ece\u6587\u4ef6\u8bfb\u53d6\u8f93\u5165<\/strong> \u9002\u5408\u5904\u7406\u5927\u91cf\u6570\u636e\u6216\u4ece\u5916\u90e8\u6587\u4ef6\u83b7\u53d6\u8f93\u5165\uff1b<\/p>\n<p><strong>\u4f7f\u7528\u56fe\u5f62\u7528\u6237\u754c\u9762<\/strong> \u9002\u5408\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\uff1b<\/p>\n<p><strong>\u4ece\u7f51\u7edc\u83b7\u53d6\u8f93\u5165<\/strong> \u9002\u5408\u5f00\u53d1\u7f51\u7edc\u5e94\u7528\u3002\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u63d0\u5347\u7a0b\u5e8f\u7684\u7528\u6237\u4f53\u9a8c\u548c\u529f\u80fd\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8f93\u5165\u591a\u4e2a\u6570\u503c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6765\u63a5\u6536\u7528\u6237\u8f93\u5165\u3002\u8981\u8f93\u5165\u4e09\u4e2a\u6570\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528<code>input()<\/code>\u4e09\u6b21\uff0c\u6216\u8005\u4f7f\u7528\u9017\u53f7\u5206\u9694\u7684\u65b9\u5f0f\u8f93\u5165\uff0c\u5e76\u5229\u7528<code>split()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u5206\u5272\u6210\u591a\u4e2a\u90e8\u5206\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">a, b, c = map(int, input(&quot;\u8bf7\u8f93\u5165\u4e09\u4e2a\u6570\uff0c\u7528\u7a7a\u683c\u5206\u9694\uff1a&quot;).split())\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u4e00\u884c\u4e2d\u8f93\u5165\u4e09\u4e2a\u6570\uff0c\u7a0b\u5e8f\u4f1a\u5c06\u5b83\u4eec\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/p>\n<p><strong>\u8f93\u5165\u7684\u6570\u503c\u53ef\u4ee5\u662f\u4efb\u4f55\u7c7b\u578b\u5417\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u8f93\u5165\u7684\u6570\u503c\u53ef\u4ee5\u662f\u6574\u6570\u3001\u6d6e\u70b9\u6570\u7b49\u3002\u53ea\u9700\u5728\u4f7f\u7528<code>input()<\/code>\u540e\uff0c\u9002\u5f53\u5730\u8f6c\u6362\u7c7b\u578b\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5e0c\u671b\u8f93\u5165\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>float()<\/code>\uff1a<\/p>\n<pre><code class=\"language-python\">a, b, c = map(float, input(&quot;\u8bf7\u8f93\u5165\u4e09\u4e2a\u6d6e\u70b9\u6570\uff0c\u7528\u7a7a\u683c\u5206\u9694\uff1a&quot;).split())\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u7075\u6d3b\u6027\u8f83\u9ad8\uff0c\u9002\u5408\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<p><strong>\u5982\u679c\u7528\u6237\u8f93\u5165\u7684\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u4e3a\u4e86\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u6765\u6355\u83b7\u8f93\u5165\u9519\u8bef\u3002\u901a\u8fc7<code>try...except<\/code>\u7ed3\u6784\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u7528\u6237\u8f93\u5165\u4e0d\u7b26\u5408\u9884\u671f\u7684\u60c5\u51b5\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">try:\n    a, b, c = map(int, input(&quot;\u8bf7\u8f93\u5165\u4e09\u4e2a\u6574\u6570\uff0c\u7528\u7a7a\u683c\u5206\u9694\uff1a&quot;).split())\nexcept ValueError:\n    print(&quot;\u8f93\u5165\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u8bf7\u786e\u4fdd\u8f93\u5165\u4e09\u4e2a\u6574\u6570\u3002&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u53ef\u4ee5\u5f15\u5bfc\u7528\u6237\u91cd\u65b0\u8f93\u5165\uff0c\u786e\u4fdd\u7a0b\u5e8f\u4e0d\u4f1a\u56e0\u9519\u8bef\u7684\u8f93\u5165\u800c\u5d29\u6e83\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528 Python \u8f93\u5165\u4e09\u4e2a\u6570\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u901a\u8fc7 input() \u51fd\u6570\u3001\u547d\u4ee4\u884c\u53c2\u6570\u3001\u6587\u4ef6\u8bfb\u53d6\u7b49\u3002 \u6700\u5e38\u89c1\u7684\u65b9 [&hellip;]","protected":false},"author":3,"featured_media":1095200,"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\/1095193"}],"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=1095193"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1095193\/revisions"}],"predecessor-version":[{"id":1095202,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1095193\/revisions\/1095202"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1095200"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1095193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1095193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1095193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}