Python 3 Tutorial

Read(86946) update time(2022-04-15)

"Python 3 Tutorial" The 3.0 version of Python is often called Python 3000, or Py3k for short. This is a major upgrade compared to earlier versions of Python. In order not to bring too much burden, Python 3.0 was not designed with backward compatibility in mind. Python language is very simple and easy to use for beginners and to complete common tasks.


Python (British pronunciation: /ˈpaɪθən/ American pronunciation: /ˈpaɪθɑːn/), is an object-oriented interpreted computer programming language invented by the Dutch Guido van Rossum in 1989. The first public release was released in 1991.

Python 3.0 (aka "Python 3000" or "Py3k") is a new version of this version and is not compatible with 2.x versions. The language is largely the same, but many details, especially the way built-in objects like dictionaries and strings work, have changed significantly, and many deprecated features have ultimately been removed. In addition, the standards library has been reorganized in some prominent places.

Tips: This tutorial is mainly for learning Python 3.x version. If you are using Python 2.x version, please move to Python 2.X Tutorial for version .

Let’s experience the first Python3 programming code!

The first Python3.x program

Instance

#!/usr/bin/python3

print("Hello, World!")

Run instance»

Click" Run Example" button to view the online example

Tips: Our Python3 tutorial will help you learn the Python3 programming language and its applications step by step, if you have any questions, please Go to the PHP Chinese website Python3 Community to ask your questions, and enthusiastic netizens will answer them for you.

Advantages and Disadvantages of Python

Advantages

1. The language is simple and beautiful, everything that Java can implement with python can be implemented (except Android development), and everything that python can implement Java may not necessarily be able to achieve such things as (automated operation and maintenance, crawlers)

2. Cross-platform, universal for window, linux, and mac

3. High ranking, complete community, and powerful third-party libraries

4. Glue language can easily combine various modules of other languages ​​​​(c,c)

5. High development efficiency

6. Wide range of applications

Disadvantages

1. The running speed is slow, pthon is an interpreted language, and it needs to be converted line by line into machine code understood by the CPU during operation, which is time-consuming

2.The code cannot be encrypted

3. GIL lock limits concurrency

4. py2 and py3 are incompatible

Content covered by this Python3 tutorial manual

This tutorial covers all the basics of Python3 and Advanced knowledge includes python3 syntax, types and variables, functions, generators, modules, object-oriented knowledge, etc.

Tips: Each chapter of this tutorial contains many Python3 examples. You can directly click the "Run Example" button to view the results online. These examples will help you better understand and use the Python3 programming language.