Python first, Python first
This year, Python has suddenly become very popular. It is said that it is easy to get started and curious. It started my Python journey. Before learning Python, I had only a simple Java Foundation and no other programming experience, I have never written a blog before. If there are any errors or deficiencies in the text, I hope you can give your feedback and give me some advice. Now I have set a small goal for myself to write a crawler ,. Go on, start to embark on our Python path.
The following content is my collection of documents from the Internet. Many places are suspected of copying King Jin jiao. I hope Daniel will not care about it with me.
Areas of expertise in PYTHON
WEB open
Network Programming
Scientific operations
GUI graphics Development
Automated O & M
What kind of language is PYTHON?
Programming languages include compilation and interpretation, static and dynamic languages, strong and weak definition languages.
Compilation and interpretation: both are high-level languages translated into machine languages. The compilation and assembly languages are the same. There is a program responsible for translation to convert our source code, generate the corresponding executable code. This process is called compilation. The program responsible for compilation is called the compiler. The program compiled in the interpreted language does not need to be compiled. The interpreted language is translated only when it is running. During execution, a special interpreter translates the high-level language into a machine language, each statement is translated only when it is executed. In this way, the interpreter language translates every time it is executed, which is inefficient. Compilation type: All translations are completed at a time. Interpretation Type: Where to translate
Static language and Dynamic Language: Dynamic language refers to the language used for data type check during runtime. When programming in Dynamic Language, you never need to specify the data type for any variable, when you assign a value to a variable for the first time, the internal component records the data type. Python and ruby are typical dynamic type languages. Static type language: its data type is checked during compilation. When writing a program, it is required to keep the data types of all variables, such as C/C ++/C #/java.
Strong Type Definition Language and weak type definition language: Strong Type Definition Language: language that forces data type definition. Once a variable is specified with a data type, if it is not forcibly converted, it will always be the data type. A strong-Type Definition Language is a type-safe language. Weak Type Definition Language: language in which data types can be ignored. A variable can assign values of different data types. A strong-type definition language may be inferior to a weak-type definition language in terms of speed, but its rigorous performance effectively avoids many errors.
From the above, we can see that Python is a strongly typed language of dynamic interpretation.
Python interpreter type
CPython official version interpreter, which is developed in C language. Running Python on the command line is to start the CPython interpreter.
IPython is an interactive interpreter based on CPython, Which is enhanced in interaction mode, but the execution of code functions is exactly the same as that of CPython, CPython >>> as the prompt IPython uses In [serial number]: As the prompt
PyPy is another Python interpreter. It aims to achieve the execution speed and dynamically compile Python (note that it is not an explanation), so it can significantly improve the execution speed of Python code, the vast majority of Python code can be run in PyPy, but there are some differences between the two, resulting in different results for the same code to be executed in the two interpreters.
Jython is a Python interpreter running on the Java platform. You can directly compile Python code into Java bytecode for execution.
IronPython is a Python interpreter running on the Microsoft. Net platform. It can directly compile Python code into Net bytecode.
There are many other interpreters. I will not introduce them here.
Python version
Python versions have been updated to 3.6.3 so far. The biggest difference is that versions 2 and 3
The biggest difference between Python2 and 3: The biggest change is that 3 can directly write Chinese by default, and 2 cannot write Chinese.
In my opinion, the difference between 2 and 3 is still very big. There are many function methods that are used differently, I bought a "Python basics tutorial" from hitter's recommendations, and found that this book is mainly about version 2.
As for the preparations in the early stage, such as Python installation and environment variable configuration, I will not introduce them here. There are too many development tools on Baidu. I use PyCharm.
Everything is ready. I can't wait to use Python to output "Hello world ".