Python 3 教程
Python的3.0版本,常被称为Python 3000,或简称Py3k。相对于Python的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0在设计的时候没有考虑向下兼容。
Python 介绍及安装教程我们在Python 2.X版本的教程中已有介绍,这里就不再赘述。
你也可以点击 Python2.x与3.x版本区别 来查看两者的不同。
本教程主要针对Python 3.x版本的学习,如果你使用的是Python 2.x版本请移步至Python 2.X版本的教程。
查看python版本
我们可以在命令窗口(Windows 使用 win+R 调出 cmd 运行框)使用以下命令查看我们使用的Python版本:
python -V
以上命令执行结果如下:
Python 3.3.2
你也可以进入Python的交互式编程模式,查看版本:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>>
第一个Python3.x程序
对于大多数程序语言,第一个入门编程代码便是"Hello World!",以下代码为使用Python输出"Hello World!":
实例(Python 3.0+)
你可以将以上代码保存在 hello.py 文件中并使用 python 命令执行该脚本文件。
$ python3 hello.py
以上命令输出结果为:
Hello, World!
相关内容:
Python3.6.3 中文手册
点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html
Design systems
Not all design systems are equally effective. Some can generate coherent user experiences, others produce confusing patchwork designs. Some inspire teams to contribute to them, others are neglected. S......一起来看看 《Design systems》 这本书的介绍吧!