{"id":20743,"date":"2024-11-19T16:12:32","date_gmt":"2024-11-19T08:12:32","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20743\/"},"modified":"2024-11-19T16:12:32","modified_gmt":"2024-11-19T08:12:32","slug":"sublime%e4%b8%ad%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cinput%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20743\/","title":{"rendered":"sublime\u4e2d\u5982\u4f55\u8fd0\u884cinput\u51fd\u6570"},"content":{"rendered":"<blockquote><p>\n  \u5728 sublime \u4e2d\u8fd0\u884c input() \u51fd\u6570\uff1a\u5b89\u88c5 python \u63d2\u4ef6\u3002\u521b\u5efa python \u6587\u4ef6\u5e76\u8f93\u5165 x = input(&#8220;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff1a&#8221;) \u548c print(&#8220;\u4f60\u8f93\u5165\u7684\u6570\u5b57\u662f\uff1a&#8221;, x) \u4ee3\u7801\u3002\u6309 ctrl + b\uff08windows\uff09\u6216 cmd + b\uff08macos\uff09\u6216\u8f6c\u5230 \u5de5\u5177 \u83dc\u5355\u9009\u62e9 \u6784\u5efa\uff0c\u6216\u53f3\u952e\u5355\u51fb\u6587\u4ef6\u5e76\u9009\u62e9 \u6784\u5efa\u3002\u5728 sublime text \u7684\u5185\u7f6e\u7ec8\u7aef\u4e2d\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff0c\u7a0b\u5e8f\u5c06\u6253\u5370\u60a8\u8f93\u5165\u7684\u6570\u5b57\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040317061785951.jpg\" class=\"aligncenter\" title=\"sublime\u4e2d\u5982\u4f55\u8fd0\u884cinput\u51fd\u6570\u63d2\u56fe\" alt=\"sublime\u4e2d\u5982\u4f55\u8fd0\u884cinput\u51fd\u6570\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Sublime \u4e2d\u8fd0\u884c input \u51fd\u6570<\/strong><\/p>\n<p>\u5728 Sublime \u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u8fd0\u884c input() \u51fd\u6570\uff1a<\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 Python \u63d2\u4ef6\uff1a<\/strong><br \/>\u786e\u4fdd\u5df2\u5b89\u88c5 Sublime Text \u7684 Python \u63d2\u4ef6\uff0c\u4ee5\u4fbf\u7f16\u8f91\u5668\u80fd\u591f\u8fd0\u884c Python \u4ee3\u7801\u3002<\/li>\n<li>\n<p><strong>\u521b\u5efa Python \u6587\u4ef6\uff1a<\/strong><br \/>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\uff08.py \u6269\u5c55\u540d\uff09\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>x = input(\"\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff1a\")\nprint(\"\u4f60\u8f93\u5165\u7684\u6570\u5b57\u662f\uff1a\", x)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p><strong>\u8fd0\u884c\u4ee3\u7801\uff1a<\/strong><br \/>\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\u4e4b\u4e00\u8fd0\u884c Python \u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u6309\u4e0b Ctrl + B\uff08Windows\uff09\u6216 Cmd + B\uff08macOS\uff09<\/li>\n<li>\u8f6c\u5230 \u5de5\u5177 \u83dc\u5355\uff0c\u7136\u540e\u9009\u62e9 \u6784\u5efa<\/li>\n<li>\u53f3\u952e\u5355\u51fb\u6587\u4ef6\u5e76\u9009\u62e9 \u6784\u5efa<\/li>\n<\/ul>\n<\/li>\n<li> <strong>\u8f93\u5165\u5e76\u5728\u7ec8\u7aef\u4e2d\u67e5\u770b\u8f93\u51fa\uff1a<\/strong><br \/>\u7a0b\u5e8f\u5c06\u5728 Sublime Text \u7684\u5185\u7f6e\u7ec8\u7aef\u4e2d\u8fd0\u884c\u3002\u5b83\u4f1a\u63d0\u793a\u60a8\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff0c\u60a8\u8f93\u5165\u540e\uff0c\u7a0b\u5e8f\u4f1a\u6253\u5370\u60a8\u8f93\u5165\u7684\u6570\u5b57\u3002<\/li>\n<\/ol>\n<p>\u4f8b\u5982\uff0c\u60a8\u8f93\u5165\uff1a<\/p>\n<pre>5<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u5c06\u4e3a\uff1a<\/p>\n<pre>\u4f60\u8f93\u5165\u7684\u6570\u5b57\u662f\uff1a 5<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e2d\u5982\u4f55\u8fd0\u884cinput\u51fd\u6570\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 sublime \u4e2d\u8fd0\u884c input() \u51fd\u6570\uff1a\u5b89\u88c5 python \u63d2\u4ef6\u3002\u521b\u5efa python \u6587\u4ef6\u5e76\u8f93\u5165 x = input(&#8220;\u8bf7\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff1a&#8221;) \u548c print(&#8220;\u4f60\u8f93\u5165\u7684\u6570\u5b57\u662f\uff1a&#8221;, x) \u4ee3\u7801\u3002\u6309 ctrl + b\uff08windows\uff09\u6216 cmd + b\uff08macos\uff09\u6216\u8f6c\u5230 \u5de5\u5177 \u83dc\u5355\u9009\u62e9 \u6784\u5efa\uff0c\u6216\u53f3\u952e\u5355\u51fb\u6587\u4ef6\u5e76\u9009\u62e9 \u6784\u5efa\u3002\u5728 sublime text \u7684\u5185\u7f6e\u7ec8\u7aef\u4e2d\u8f93\u5165\u4e00\u4e2a\u6570\u5b57\uff0c\u7a0b\u5e8f\u5c06\u6253\u5370\u60a8\u8f93\u5165\u7684\u6570\u5b57\u3002 \u5982\u4f55\u5728 Sublime \u4e2d\u8fd0\u884c input \u51fd\u6570 \u5728 Sublime \u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u8fd0\u884c input() \u51fd\u6570\uff1a \u5b89\u88c5 Python \u63d2\u4ef6\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Sublime Text \u7684 Python \u63d2\u4ef6\uff0c\u4ee5\u4fbf\u7f16\u8f91\u5668\u80fd\u591f\u8fd0\u884c Python \u4ee3\u7801\u3002 \u521b\u5efa Python \u6587\u4ef6\uff1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\uff08.py \u6269\u5c55\u540d\uff09\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20743","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20743"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20743\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}