{"id":106,"date":"2020-04-19T09:36:37","date_gmt":"2020-04-19T01:36:37","guid":{"rendered":"http:\/\/python.vvipblog.com\/?p=106"},"modified":"2020-04-19T09:36:37","modified_gmt":"2020-04-19T01:36:37","slug":"python-3%e6%95%99%e7%a8%8b1-python-3-%e6%95%99%e7%a8%8b%e6%a6%82%e8%bf%b0","status":"publish","type":"post","link":"http:\/\/www.vvipblog.com\/?p=106","title":{"rendered":"Python 3\u6559\u7a0b1-Python 3 \u6559\u7a0b\u6982\u8ff0"},"content":{"rendered":"<h1>Python 3 \u6559\u7a0b<\/h1>\n<div class=\"tutintro\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/new.vvipblog.com\/wp-content\/uploads\/2020\/04\/1587260216-6e8efbe3a442748.png\" alt=\"python3\" width=\"150\" height=\"81\" \/>Python \u7684 3.0 \u7248\u672c\uff0c\u5e38\u88ab\u79f0\u4e3a Python 3000\uff0c\u6216\u7b80\u79f0 Py3k\u3002\u76f8\u5bf9\u4e8e Python \u7684\u65e9\u671f\u7248\u672c\uff0c\u8fd9\u662f\u4e00\u4e2a\u8f83\u5927\u7684\u5347\u7ea7\u3002\u4e3a\u4e86\u4e0d\u5e26\u5165\u8fc7\u591a\u7684\u7d2f\u8d58\uff0cPython 3.0 \u5728\u8bbe\u8ba1\u7684\u65f6\u5019\u6ca1\u6709\u8003\u8651\u5411\u4e0b\u517c\u5bb9\u3002<\/p>\n<p>\u672c\u6559\u7a0b\u4e3b\u8981\u9488\u5bf9 Python 3.x \u7248\u672c\u7684\u5b66\u4e60\u3002<\/p>\n<p><strong>\u5b98\u65b9\u5ba3\u5e03\uff0c2020 \u5e74 1 \u6708 1 \u65e5\uff0c \u505c\u6b62 Python 2 \u7684\u66f4\u65b0\u3002<\/strong><\/p>\n<\/div>\n<hr \/>\n<h2>\u67e5\u770b Python \u7248\u672c<\/h2>\n<p>\u6211\u4eec\u53ef\u4ee5\u5728\u547d\u4ee4\u7a97\u53e3(Windows \u4f7f\u7528 win+R \u8c03\u51fa cmd \u8fd0\u884c\u6846)\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u6211\u4eec\u4f7f\u7528\u7684 Python \u7248\u672c\uff1a<\/p>\n<pre class=\"prettyprint prettyprinted\"><span class=\"pln\">python <\/span><span class=\"pun\">-<\/span><span class=\"pln\">V<\/span><\/pre>\n<p>\u4ee5\u4e0a\u547d\u4ee4\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre class=\"prettyprint prettyprinted\"><span class=\"typ\">Python<\/span> <span class=\"lit\">3.8<\/span><span class=\"pun\">.<\/span><span class=\"lit\">0<\/span><\/pre>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u8fdb\u5165Python\u7684\u4ea4\u4e92\u5f0f\u7f16\u7a0b\u6a21\u5f0f\uff0c\u67e5\u770b\u7248\u672c\uff1a<\/p>\n<pre class=\"prettyprint prettyprinted\">Python 3.8.0 (tags\/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt;<\/pre>\n<hr \/>\n<h2>\u7b2c\u4e00\u4e2aPython3.x\u7a0b\u5e8f<\/h2>\n<p>\u5bf9\u4e8e\u5927\u591a\u6570\u7a0b\u5e8f\u8bed\u8a00\uff0c\u7b2c\u4e00\u4e2a\u5165\u95e8\u7f16\u7a0b\u4ee3\u7801\u4fbf\u662f&#8221;Hello World\uff01&#8221;\uff0c\u4ee5\u4e0b\u4ee3\u7801\u4e3a\u4f7f\u7528Python\u8f93\u51fa&#8221;Hello World\uff01&#8221;\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b(Python 3.0+)<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-comment\">#!\/usr\/bin\/python3<\/span> <span class=\"hl-identifier\">print<\/span><span class=\"hl-brackets\">(<\/span><span class=\"hl-quotes\">&#8220;<\/span><span class=\"hl-string\">Hello, World!<\/span><span class=\"hl-quotes\">&#8220;<\/span><span class=\"hl-brackets\">)<\/span><\/div>\n<\/div>\n<p><a class=\"showbtn\" href=\"https:\/\/www.runoob.com\/try\/runcode.php?filename=HelloWorld&amp;type=python3\" target=\"_blank\" rel=\"noopener noreferrer\">\u8fd0\u884c\u5b9e\u4f8b \u00bb<\/a><\/p>\n<\/div>\n<p>\u4f60\u53ef\u4ee5\u5c06\u4ee5\u4e0a\u4ee3\u7801\u4fdd\u5b58\u5728 hello.py \u6587\u4ef6\u4e2d\u5e76\u4f7f\u7528 python \u547d\u4ee4\u6267\u884c\u8be5\u811a\u672c\u6587\u4ef6\u3002<\/p>\n<pre class=\"prettyprint prettyprinted\"><span class=\"pln\">$ python3 hello<\/span><span class=\"pun\">.<\/span><span class=\"pln\">py<\/span><\/pre>\n<p>\u4ee5\u4e0a\u547d\u4ee4\u8f93\u51fa\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre class=\"prettyprint prettyprinted\"><span class=\"typ\">Hello<\/span><span class=\"pun\">,<\/span> <span class=\"typ\">World<\/span><span class=\"pun\">!<\/span><\/pre>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Python 3 \u6559\u7a0b Python \u7684 3.0 \u7248\u672c\uff0c\u5e38\u88ab\u79f0\u4e3a Python 3000\uff0c\u6216\u7b80\u79f0 Py3k\u3002\u76f8&hellip;<\/p>\n","protected":false},"author":1,"featured_media":109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-106","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-py0"],"_links":{"self":[{"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=106"}],"version-history":[{"count":0,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=\/wp\/v2\/media\/109"}],"wp:attachment":[{"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.vvipblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}