Python 入门教程

Python 入门教程

u=353363699,3033570737&fm=27&gp=0

Python是一种解释型、面向对象、动态数据类型的高级程序设计语言。

Python由Guido van Rossum于1989年底发明,第一个公开发行版发行于1991年。

像Perl语言一样, Python 源代码同样遵循 GPL(GNU General Public License)协议。

执行Python程序

对于大多数程序语言,第一个入门编程代码便是"Hello World!",以下代码为使用Python输出"Hello World!":

实例(Python 2.0+)

#!/usr/bin/python
print "Hello, World!";

image

Python 3.0+版本已经把print作为一个内置函数,正确输出"Hello World!"代码如下:

实例(Python 3.0+)

#!/usr/bin/python
print("Hello, World!");

image

原文地址:https://www.cnblogs.com/quanweiru/p/8321431.html