PythonBasic Tutorial

python

Python is a high-level programming language with interpreted, object-oriented, and dynamic data types.

Python was invented by Guido van Rossum at the end of 1989, and the first public release was in 1991.

Like the Perl language, Python source code also follows the GPL (GNU General Public License) agreement.

Officially announced, on January 1, 2020, updates to Python 2 were stopped.

Python 2.7 was determined to be the last Python 2.x version.



Who is this tutorial for?

This tutorial is suitable for developers who want to learn the Python programming language from scratch. Of course, this tutorial also goes deeper into some modules to give you a better understanding of Python applications.

This tutorial is mainly for learning Python 2.x. If you are using Python 3.x, please move toPython 3.X Tutorial。

All examples in this tutorial are based on Python 2.7.



What you need to know before learning this tutorial

Before continuing with this tutorial, you should understand some basic computer programming terminology. If you have learned programming languages such as PHP, ASP, etc., it will help you understand Python programming faster.



Running Python Programs

For most programming languages, the first introductory code is "Hello World!". The following code uses Python to output "Hello World!":

Examples

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

Run Example »

Python 3.0+ already uses print as a built-in function. The code to output "Hello World!" is as follows:

Example (Python 3.0+)

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

Run Example »

Related Articles

Python 2.7.14 Chinese Manual

Introduction to Python IDE (Integrated Development Environment)

Python Coding Standards (Google)

Python 3.X Version Tutorial

Other Extensions