[Python] Python Series Tutorials--Python3 Introduction (1)

foreword

Version 3.0 of Python, often referred to as Python 3000, or Py3k for short. This is a major upgrade over earlier versions of Python. In order not to bring too much burden, Python 3.0 did not consider backward compatibility when it was designed.

Python introduction and installation tutorials have been introduced in the Python 2.X version tutorials, so I won’t repeat them here.

You can also click on the difference between Python2.x and 3.x versions to see the difference between the two.

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

It is officially announced that on January 1, 2020, the update of Python 2 will be stopped.

Check Python version

We can use the following command in the command window (Windows uses win+R to bring up the cmd run box) to check the version of Python we are using:

python -V
python --version

The above command execution results are as follows:

Python 3.3.2

Introduction to Python3

Python is a high-level scripting language that combines interpretability, compilation, interactivity, and object-oriented.

Python is designed to be highly readable. Compared with other languages, it often uses English keywords and some punctuation marks in other languages. It has more distinctive grammatical structures than other languages.

  • Python is an interpreted language: this means that there is no compilation part of the development process. Similar to PHP and Perl languages.

  • Python is an interactive language: this means that you can execute code directly after a Python prompt >>>.

  • Python is an object-oriented language: This means that Python supports an object-oriented style or programming technique in which code is encapsulated in objects.

  • Python is a beginner's language: Python is a great language for beginning programmers, and it supports a wide range of application development, from simple word processing to WWW browsers to games.

History of Python development

Python was devised by Guido van Rossum at the Dutch National Institute for Mathematics and Computer Science in the late 1980s and early 1990s.

Python itself is also developed from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, Unix shell and other scripting languages, etc.

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

Python is now maintained by a core development team, with Guido van Rossum still playing a vital role guiding its progress.

Python 2.0, released on October 16, 2000, added full garbage collection and support for Unicode.

Python 3.0 was released on December 3, 2008, and this version is not fully compatible with previous Python source code. However, many new features were later ported to older Python 2.6/2.7 versions as well.

Version 3.0 of Python, often referred to as Python 3000, or Py3k for short. This is a major upgrade over earlier versions of Python.

Python 2.7 is identified as the last Python 2.x version, which supports part of Python 3.1 syntax in addition to Python 2.x syntax.

Python features

  1. Ease of learning: Python has relatively few keywords, a simple structure, and a well-defined syntax, making it easier to learn.

  2. Ease of reading: Python code is more clearly defined.

  3. Easy to maintain: Python's success lies in its source code is quite easy to maintain.

  4. An extensive standard library: One of Python's greatest strengths is its rich library, which is cross-platform and works well on UNIX, Windows, and Macintosh.

  5. Interactive mode: Supported by interactive mode, you can input the language from the terminal to execute the code and get the result, interactive test and debug code fragments.

  6. Portability: Due to its open source nature, Python has been ported (that is, made to work) to many platforms.

  7. Extensible: If you need a key piece of code that runs fast, or want to write some algorithms that you don't want to open, you can use C or C++ to complete that part of the program, and then call it from your Python program.

  8. Databases: Python provides interfaces to all major commercial databases.

  9. GUI programming: Python supports GUIs that can be created and ported to many system calls.

  10. Embeddable: You can embed Python into C/C++ programs, allowing users of your programs to gain "scripting" capabilities.

Python application

  • Youtube - video social networking site
  • Reddit - social sharing site
  • Dropbox - file sharing service
  • Douban.com - an information database website for cultural products such as books, records, and movies
  • Zhihu - a question and answer website
  • Nutshell - a general technology theme website
  • Bottle - Python micro web framework
  • EVE - The online game EVE uses Python extensively for development
  • Blender - Open source 3D drawing software using Python as a modeling tool and GUI language
  • Inkscape - An open source SVG vector graphics editor.

Guess you like

Origin blog.csdn.net/u011397981/article/details/130980776