{"id":931941,"date":"2024-12-26T17:48:12","date_gmt":"2024-12-26T09:48:12","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/931941.html"},"modified":"2024-12-26T17:48:14","modified_gmt":"2024-12-26T09:48:14","slug":"python-input%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/931941.html","title":{"rendered":"python input\u5982\u4f55\u8fd0\u884c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25070024\/a28f957d-84b4-4f9b-9793-f96fad8f9ac5.webp\" alt=\"python input\u5982\u4f55\u8fd0\u884c\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u7684<code>input()<\/code>\u51fd\u6570\u4e3b\u8981\u7528\u4e8e\u4ece\u7528\u6237\u90a3\u91cc\u83b7\u53d6\u8f93\u5165\u3002\u8981\u8fd0\u884c\u5b83\uff0c\u4f60\u53ea\u9700\u5728\u7a0b\u5e8f\u4e2d\u8c03\u7528<code>input()<\/code>\u51fd\u6570\uff0c\u8fd9\u5c06\u6682\u505c\u7a0b\u5e8f\u7684\u6267\u884c\uff0c\u76f4\u5230\u7528\u6237\u8f93\u5165\u4e00\u4e9b\u5185\u5bb9\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u3002<\/strong> \u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u83b7\u53d6\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u6216\u8005\u901a\u8fc7\u7c7b\u578b\u8f6c\u6362\u5c06\u5176\u8f6c\u6362\u4e3a\u5176\u4ed6\u6570\u636e\u7c7b\u578b\uff08\u5982\u6574\u6570\u6216\u6d6e\u70b9\u6570\uff09\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4e86\u89e3\u5982\u4f55\u6b63\u786e\u5730\u4f7f\u7528\u548c\u5904\u7406<code>input()<\/code>\u51fd\u6570\u7684\u8f93\u5165\u975e\u5e38\u91cd\u8981\uff0c\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u80fd\u591f\u6309\u7167\u9884\u671f\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001<code>INPUT()<\/code>\u51fd\u6570\u7684\u57fa\u7840\u7528\u6cd5<\/h3>\n<\/p>\n<p><p><code>input()<\/code>\u51fd\u6570\u7684\u57fa\u672c\u7528\u6cd5\u975e\u5e38\u7b80\u5355\u3002\u5b83\u7684\u4f5c\u7528\u662f\u6682\u505c\u7a0b\u5e8f\u6267\u884c\uff0c\u7b49\u5f85\u7528\u6237\u8f93\u5165\uff0c\u7136\u540e\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u4e32\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = input(&quot;Enter your name: &quot;)<\/p>\n<p>print(f&quot;Hello, {name}!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u6253\u5370\u63d0\u793a\u4fe1\u606f\u201cEnter your name:\u201d\uff0c\u7136\u540e\u7b49\u5f85\u7528\u6237\u8f93\u5165\u3002\u5f53\u7528\u6237\u8f93\u5165\u4ed6\u4eec\u7684\u540d\u5b57\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u540e\uff0c\u7a0b\u5e8f\u4f1a\u7ee7\u7eed\u6267\u884c\uff0c\u5e76\u5c06\u7528\u6237\u8f93\u5165\u7684\u540d\u5b57\u5b58\u50a8\u5728\u53d8\u91cf<code>name<\/code>\u4e2d\uff0c\u6700\u540e\u6253\u5370\u51fa\u95ee\u5019\u8bed\u3002<\/p>\n<\/p>\n<p><p><strong>\u91cd\u8981\u63d0\u793a<\/strong>\uff1a<code>input()<\/code>\u51fd\u6570\u603b\u662f\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u5373\u4f7f\u7528\u6237\u8f93\u5165\u7684\u662f\u6570\u5b57\u3002\u56e0\u6b64\uff0c\u5982\u679c\u9700\u8981\u5bf9\u8f93\u5165\u8fdb\u884c\u6570\u5b66\u8fd0\u7b97\u6216\u5176\u4ed6\u9700\u8981\u6570\u5b57\u7c7b\u578b\u7684\u64cd\u4f5c\uff0c\u5fc5\u987b\u5c06\u5176\u8f6c\u6362\u4e3a\u9002\u5f53\u7684\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5c06\u8f93\u5165\u8f6c\u6362\u4e3a\u5176\u4ed6\u6570\u636e\u7c7b\u578b<\/h3>\n<\/p>\n<p><p>\u7531\u4e8e<code>input()<\/code>\u8fd4\u56de\u7684\u603b\u662f\u5b57\u7b26\u4e32\uff0c\u5982\u679c\u9700\u8981\u5bf9\u8f93\u5165\u7684\u6570\u5b57\u8fdb\u884c\u8ba1\u7b97\uff0c\u5fc5\u987b\u5148\u5c06\u8f93\u5165\u8f6c\u6362\u4e3a\u6570\u5b57\u7c7b\u578b\u3002\u5e38\u7528\u7684\u8f6c\u6362\u65b9\u6cd5\u5305\u62ec<code>int()<\/code>\u7528\u4e8e\u8f6c\u6362\u4e3a\u6574\u6570\u548c<code>float()<\/code>\u7528\u4e8e\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8f6c\u6362\u4e3a\u6574\u6570<\/h4>\n<\/p>\n<p><p>\u8981\u5c06\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">age = int(input(&quot;Enter your age: &quot;))<\/p>\n<p>print(f&quot;You are {age} years old.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7528\u6237\u8f93\u5165\u7684\u5e74\u9f84\u5c06\u88ab\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u4ee5\u4fbf\u540e\u7eed\u7684\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5904\u7406\u5c0f\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>float()<\/code>\u51fd\u6570\u5c06\u8f93\u5165\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">height = float(input(&quot;Enter your height in meters: &quot;))<\/p>\n<p>print(f&quot;Your height is {height} meters.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5904\u7406\u548c\u8ba1\u7b97\u7528\u6237\u8f93\u5165\u7684\u6d6e\u70b9\u6570\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5904\u7406\u8f93\u5165\u9519\u8bef<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7528\u6237\u8f93\u5165\u7684\u6570\u636e\u53ef\u80fd\u4e0d\u7b26\u5408\u9884\u671f\uff0c\u4f8b\u5982\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\u5bfc\u81f4\u8f6c\u6362\u5931\u8d25\u3002\u56e0\u6b64\uff0c\u7f16\u5199\u5065\u58ee\u7684\u4ee3\u7801\u4ee5\u5904\u7406\u8f93\u5165\u9519\u8bef\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5904\u7406\u6574\u6570\u8f93\u5165\u9519\u8bef<\/h4>\n<\/p>\n<p><p>\u4ee5\u4e0b\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u6355\u83b7\u548c\u5904\u7406\u7528\u6237\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\u5bfc\u81f4\u7684\u8f6c\u6362\u9519\u8bef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    age = int(input(&quot;Enter your age: &quot;))<\/p>\n<p>    print(f&quot;You are {age} years old.&quot;)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;Invalid input. Please enter a valid number.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5982\u679c\u7528\u6237\u8f93\u5165\u4e86\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u7a0b\u5e8f\u5c06\u6355\u83b7<code>ValueError<\/code>\u5f02\u5e38\uff0c\u5e76\u63d0\u793a\u7528\u6237\u8f93\u5165\u6709\u6548\u6570\u5b57\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5904\u7406\u6d6e\u70b9\u6570\u8f93\u5165\u9519\u8bef<\/h4>\n<\/p>\n<p><p>\u540c\u6837\u7684\u5904\u7406\u65b9\u5f0f\u4e5f\u9002\u7528\u4e8e\u6d6e\u70b9\u6570\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    height = float(input(&quot;Enter your height in meters: &quot;))<\/p>\n<p>    print(f&quot;Your height is {height} meters.&quot;)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;Invalid input. Please enter a valid number.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u7a0b\u5e8f\u53ef\u4ee5\u66f4\u5065\u58ee\u5730\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u63d0\u9ad8\u7528\u6237\u8f93\u5165\u4f53\u9a8c<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u7528\u6237\u8f93\u5165\u4f53\u9a8c\uff0c\u53ef\u4ee5\u901a\u8fc7\u63d0\u4f9b\u66f4\u591a\u7684\u63d0\u793a\u4fe1\u606f\u6216\u9650\u5236\u8f93\u5165\u683c\u5f0f\u6765\u5e2e\u52a9\u7528\u6237\u8f93\u5165\u6b63\u786e\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u63d0\u4f9b\u8be6\u7ec6\u7684\u63d0\u793a\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u63d0\u4f9b\u66f4\u591a\u7684\u63d0\u793a\u4fe1\u606f\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u7406\u89e3\u7a0b\u5e8f\u7684\u8981\u6c42\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">age = input(&quot;Enter your age (in years): &quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u505a\u6cd5\u53ef\u4ee5\u51cf\u5c11\u7528\u6237\u8f93\u5165\u9519\u8bef\u7684\u53ef\u80fd\u6027\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u9650\u5236\u8f93\u5165\u683c\u5f0f<\/h4>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u901a\u8fc7\u9650\u5236\u8f93\u5165\u683c\u5f0f\u6765\u63d0\u9ad8\u8f93\u5165\u7684\u51c6\u786e\u6027\u3002\u4f8b\u5982\uff0c\u8981\u6c42\u7528\u6237\u8f93\u5165\u7279\u5b9a\u683c\u5f0f\u7684\u65e5\u671f\u6216\u7535\u8bdd\u53f7\u7801\u3002<\/p>\n<\/p>\n<p><p>\u867d\u7136<code>input()<\/code>\u51fd\u6570\u672c\u8eab\u65e0\u6cd5\u76f4\u63a5\u9650\u5236\u8f93\u5165\u683c\u5f0f\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u989d\u5916\u7684\u4ee3\u7801\u6765\u68c0\u67e5\u8f93\u5165\u683c\u5f0f\u662f\u5426\u7b26\u5408\u8981\u6c42\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u7efc\u5408\u793a\u4f8b<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7efc\u5408\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\u3001\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u3001\u5904\u7406\u8f93\u5165\u9519\u8bef\uff0c\u5e76\u63d0\u9ad8\u7528\u6237\u8f93\u5165\u4f53\u9a8c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_user_info():<\/p>\n<p>    while True:<\/p>\n<p>        try:<\/p>\n<p>            age = int(input(&quot;Enter your age (in years): &quot;))<\/p>\n<p>            if age &lt;= 0:<\/p>\n<p>                print(&quot;Age must be a positive integer.&quot;)<\/p>\n<p>                continue<\/p>\n<p>            height = float(input(&quot;Enter your height in meters: &quot;))<\/p>\n<p>            if height &lt;= 0:<\/p>\n<p>                print(&quot;Height must be a positive number.&quot;)<\/p>\n<p>                continue<\/p>\n<p>            break<\/p>\n<p>        except ValueError:<\/p>\n<p>            print(&quot;Invalid input. Please enter valid numbers.&quot;)<\/p>\n<p>    print(f&quot;Thank you! You are {age} years old and {height} meters tall.&quot;)<\/p>\n<p>get_user_info()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u63d0\u793a\u7528\u6237\u8f93\u5165\u5e74\u9f84\u548c\u8eab\u9ad8\uff0c\u5e76\u68c0\u67e5\u8f93\u5165\u7684\u6709\u6548\u6027\u3002\u5982\u679c\u8f93\u5165\u65e0\u6548\uff0c\u7a0b\u5e8f\u4f1a\u63d0\u793a\u7528\u6237\u5e76\u91cd\u65b0\u8bf7\u6c42\u8f93\u5165\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong><code>input()<\/code>\u51fd\u6570\u5728Python\u4e2d\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u7528\u4e8e\u83b7\u53d6\u7528\u6237\u8f93\u5165\u3002<\/strong> \u901a\u8fc7\u7406\u89e3\u5982\u4f55\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u5e76\u5904\u7406\u5176\u8fd4\u56de\u7684\u6570\u636e\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u7f16\u5199\u51fa\u66f4\u5065\u58ee\u548c\u7528\u6237\u53cb\u597d\u7684\u7a0b\u5e8f\u3002\u5173\u952e\u5728\u4e8e\u786e\u4fdd\u8f93\u5165\u7684\u6709\u6548\u6027\uff0c\u5e76\u6839\u636e\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3a\u9002\u5f53\u7684\u6570\u636e\u7c7b\u578b\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u63d0\u4f9b\u8be6\u7ec6\u7684\u63d0\u793a\u4fe1\u606f\u548c\u9650\u5236\u8f93\u5165\u683c\u5f0f\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u7528\u6237\u8f93\u5165\u7684\u51c6\u786e\u6027\u548c\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528input\u51fd\u6570\u83b7\u53d6\u7528\u6237\u8f93\u5165\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0cinput\u51fd\u6570\u7528\u4e8e\u63a5\u6536\u7528\u6237\u7684\u8f93\u5165\u3002\u53ea\u9700\u8c03\u7528input\u51fd\u6570\u5e76\u5728\u62ec\u53f7\u5185\u63d0\u4f9b\u63d0\u793a\u4fe1\u606f\uff0c\u7528\u6237\u8f93\u5165\u7684\u5185\u5bb9\u5c06\u4ee5\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u8fd4\u56de\u3002\u4f8b\u5982\uff1a<code>user_input = input(&quot;\u8bf7\u8f93\u5165\u60a8\u7684\u540d\u5b57\uff1a&quot;)<\/code>\u3002\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u5728\u63a7\u5236\u53f0\u4e0a\u663e\u793a\u63d0\u793a\u4fe1\u606f\uff0c\u7528\u6237\u8f93\u5165\u540e\uff0c\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u4f1a\u5b58\u50a8\u5728\u53d8\u91cf<code>user_input<\/code>\u4e2d\u3002<\/p>\n<p><strong>\u8f93\u5165\u7684\u6570\u636e\u7c7b\u578b\u5982\u4f55\u8fdb\u884c\u8f6c\u6362\uff1f<\/strong><br \/>input\u51fd\u6570\u8fd4\u56de\u7684\u6570\u636e\u7c7b\u578b\u59cb\u7ec8\u662f\u5b57\u7b26\u4e32\u3002\u5982\u679c\u9700\u8981\u5c06\u8f93\u5165\u8f6c\u6362\u4e3a\u5176\u4ed6\u6570\u636e\u7c7b\u578b\uff0c\u4f8b\u5982\u6574\u6570\u6216\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u76f8\u5e94\u7684\u8f6c\u6362\u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8981\u5c06\u7528\u6237\u8f93\u5165\u7684\u6570\u5b57\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\uff1a<code>user_number = int(input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff1a&quot;))<\/code>\u3002\u8fd9\u6837\uff0c\u7528\u6237\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u4f1a\u88ab\u8f6c\u6362\u4e3a\u6574\u6570\u7c7b\u578b\u3002<\/p>\n<p><strong>\u600e\u6837\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u4f7f\u7528try-except\u7ed3\u6784\u6765\u6355\u83b7\u53ef\u80fd\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u5f53\u7528\u6237\u8f93\u5165\u975e\u6570\u5b57\u5b57\u7b26\u65f6\uff0c\u4f7f\u7528int\u8f6c\u6362\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83\u3002\u901a\u8fc7\u5f02\u5e38\u5904\u7406\uff0c\u53ef\u4ee5\u7ed9\u7528\u6237\u63d0\u4f9b\u53cd\u9988\u5e76\u8981\u6c42\u91cd\u65b0\u8f93\u5165\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    user_number = int(input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff1a&quot;))\nexcept ValueError:\n    print(&quot;\u8f93\u5165\u65e0\u6548\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\u3002&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\uff0c\u907f\u514d\u7a0b\u5e8f\u56e0\u8f93\u5165\u9519\u8bef\u800c\u7ec8\u6b62\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u7684input()\u51fd\u6570\u4e3b\u8981\u7528\u4e8e\u4ece\u7528\u6237\u90a3\u91cc\u83b7\u53d6\u8f93\u5165\u3002\u8981\u8fd0\u884c\u5b83\uff0c\u4f60\u53ea\u9700\u5728\u7a0b\u5e8f\u4e2d\u8c03\u7528input()\u51fd\u6570\uff0c [&hellip;]","protected":false},"author":3,"featured_media":931947,"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\/931941"}],"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=931941"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/931941\/revisions"}],"predecessor-version":[{"id":931948,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/931941\/revisions\/931948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/931947"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=931941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=931941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=931941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}