Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python Basic Tutorial

Python Basic Tutorial

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

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

Like the Perl language, Python source code is also governed by the GPL (GNU General Public License).

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

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


Who should read this tutorial?

This tutorial is for developers who want to learn the Python programming language from scratch. Of course, it also goes in depth on some modules to give you a better understanding of Python's applications.

This tutorial mainly targets learning Python 2.x. If you are using Python 3.x, please move on to thePython 3.X version tutorial.

All examples in this tutorial are based on Python 2.7.


What you need to know before studying this tutorial

Before continuing with this tutorial, you should understand some basic computer programming terms. If you have learned programming languages such as PHP or ASP, it will help you understand Python programming more quickly.


Execute a Python program

For most programming languages, the first introductory program is "Hello World!". The following code outputs "Hello World!" using Python:

Example

#!/usr/bin/python

print

(

"

Hello, World!

"

)

Run Example »

In Python 3.0+, print has become 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

Python IDE (Integrated Development Environment) Introduction

Python Coding Standards (Google)

Python 3.X Version Tutorial