Back

Introduction to Python

by SpikeSpike


For readers

This article does not cover too much grammatical detail, focusing on the differences between Python and other programming languages, so this article is suitable for the following types of readers: a simple understanding of commonly used programming languages (C, C++, Java, etc.) Python is curious and interested readers.

 

Introduction

Introduction:

Python, a widely used interpreted, high-level programming, general-purpose programming language, was created in 1991 by Gido Van Rossum. Python's design philosophy emphasizes code readability and concise syntax (especially using space indentation to divide code blocks instead of using braces or keywords). Python allows developers to express ideas with less code than C++ or Java.

 

characteristic:

Python is a fully object-oriented language. Functions, modules, numbers, and strings are all objects. And fully support inheritance, overloading, derivation, and multiple inheritance, which is beneficial to enhance the reusability of source code. Python supports overloaded operators, so Python also supports generic design. Python's design philosophy is "elegant," "clear," and "simple," emphasizing that "in one way, there is only one way to do one thing." However, Python runs slower than statically typed languages such as C and Visual Basic.

 

Application range:

Web applications: Python is well-supported for various network protocols and is often used to write server software and web crawlers. Rich third-party web frameworks make it easy to develop and manage complex web applications.

GUI development: Cross-platform desktop software can be easily developed using the built-in Tkinter library or third-party GUI packages such as wxPython and PyQt.

Scientific Computing: Using NumPy, SciPy, Matplotlib and other libraries, you can easily write scientific calculation programs without having to rewrite some of the required APIs yourself.

 

Library:

Python has a powerful standard library. The core of the Python language only contains common types and functions such as numbers, strings, lists, dictionaries, files, etc. The Python standard library provides additional functions such as system management, network communication, text processing, database interface, graphics system, and XML processing. . In addition, the Python community provides a number of third-party modules that are used in a similar way to the standard library. Their functions cover many areas of scientific computing, web development, database interfaces, and graphics systems. The more famous libraries are: Django, Flask, Tornado, Matplotlib, SciPy, NumPy, PyQt, WxPython, PIL, TensorFlow, etc.

 

Development environment:

Common general-purpose IDE or text editors, such as Eclipse, VS Code, Vim, Notepad++, UltraEdit, etc., have different levels of support for Python. In addition, in addition to the IDLE attached to the standard binary distribution, there are many integrated development environments (IDEs) dedicated to Python. Some of these software designs have convenient functions such as syntax coloring, syntax checking, running debugging, auto-completion, and intellisense. Such as Anaconda, PyCharm, Spyder and so on.

 

historic version:

Version 3.0 of Python, compared to earlier versions of Python, is a larger upgrade. In order not to introduce too much cumbersome, Python 3.0 was designed without considering backward compatibility. Many programs designed for earlier versions of Python are not working properly on Python 3.0. The new Python program is recommended to use the Python 3.0 version of the syntax.

 

Program instance:

Let's take a look at the differences between C and Python by taking "Hello World" that all programmers are familiar with.

 

 

 

 

The code as a whole is relatively simple, and interested readers can modify it to make more creative character paintings.

 

To sum up

Python is not only succinct and easy to use, but also has a large number of powerful third-party libraries that are ideal for implementing your own ideas or for quickly developing gadgets to improve the efficiency of your day-to-day work.

Please submit your email address to access support documents.