1. Python Basics
1.1 Python Language Introduction
Speaking of the Python language, it's important to say that its founder Guido Rossum, who used ABC language before developing the Python language, is a language used primarily for teaching purposes (how students of computer science design a development language), GR borrowed a lot of ABC's language features while developing Python, and later some people thought that the Python language was formerly known as the ABC language.
2. Python's pros and cons
2.1 Advantages:
Python's positioning is elegant and simple, so it looks easy to understand, and for beginners it's easy to get started and can go deep and write very complex programs.
The development of high-efficiency, pythonyou very powerful third-party library, basically want to achieve any function through the computer, and Python's official library has a lot of corresponding modules.
Because Python is open source, it can be ported to many platforms (processed to make it work on different platforms).
2.2 Disadvantages:
Force indent
This should not be called a disadvantage, but it is to use indentation to differentiate the way the statement relationship or to my door a lot of beginners bring confusion. Even the most experienced Python programmers can get caught up in a trap. The most common scenario is that the mix of tabs and spaces can cause errors, which cannot be separated by the naked eye.
Poor performance
running slowly, Python runs at a much slower pace than C, but people don't feel much.
The code cannot be encrypted because Python is an explanatory language and the source code is stored in clear text.
Many times you cannot write a program as a line, such as import sys;for I in Sys.path:print i. Perl and awk do not have this limitation, it is easier to complete a simple program under the shell, do not need to like Python, the program must be written to a. py file. (This is not a limitation for many users.)
What kind of language is Python?
Python is a script interpreter that can run scripts from the command line or double-click on a script, just as you would run other applications. It is also an interactive shell that can execute arbitrary statements and expressions.
Python's interactive shell can evaluate any Python expression, including any basic mathematical expression. An interactive shell can execute arbitrary Python statements, including print statements. You can also assign a value to a variable, and the value of the variable remains in effect when the shell is opened (once the interactive shell is closed, the value of the variable is lost).
Table 1 Comparison of programming language data types
| Static type definition language |
A language that is fixed in the data type during compilation. Most static type definition languages guarantee this by requiring that their data types be declared before all variables are used. Java and C are static type definition languages. |
| Dynamic type definition language |
A language that determines the data type during runtime, as opposed to a static type definition. VBScript and Python are defined as dynamic types because they determine the type of a variable when you first assign it a value. |
| Strongly typed definition language |
A language that always enforces type definitions. Java and Python are mandatory type definitions. You have an integer that cannot be treated as a string if it is not explicitly converted. |
| Weak type definition language |
A type of language that can be ignored, as opposed to a strongly typed definition. VBScript is defined as a weak type. In VBScript, you can concatenate the string ' 12′ and integer 3 to get the string ' 123′, and then you can think of it as an integer 123, all of which do not require any display conversions. |
Python Learning Notes