Are you interested in Python programming? Whether you understand the advantages of Python programming, in fact, it has very powerful functions in the actual operation process of the computer language, the following is a detailed description of its practical application.
First, cross-platform
Linux pre-installation can be used as a shell aid for a long time, basically doing computing, the corresponding software is for linux. Because some configurations are basically required for linux, and the scripts are both shell and perl, I started to learn shell and perl, but I haven't done it for a while, and it takes a long time to get the result, let's look at the so-called garbled files in perl, which are basically forgotten, and the code we write is hard to figure out what it means.
So I started to check if there were any alternatives. I found python, and later I knew python, and I also knew that python was similar to perl. There were a large number of user groups and they were interpreted classes. After reading the syntax, I wrote some things. In fact, I initially used python only as a substitute for shell scripts. The script is a process framework, and the actual work is still completed in fortran. I write a script on windows and finally run it on linux. I should pay attention to the path issue.
- Introduction to the historical development of the Python Programming Language
- Introduction to the implementation of the Python Programming Language
- Annotate the code in VIM using Python Programming
- Why Python programming is easier than C Programming
- Related to the three advantages of Python programming in practical application
Second, good code readability
Syntax is not much different from c and fortran. I first looked at perl and tcl, and finally chose python. I saw a joke about how to generate a random number in python. The answer is to read a perl script. The forced indentation of python determines the code structure clearly. You can still understand the programs written at least a long time ago. Anyway, I am tired of the symbols of perl.
In python, the code structure is clear, so the structure of the entire program is clear after a long time. Similar to c and fortran, it is easy to use. And if you don't like oop, you can still use structured programming, unlike ruby and java.
Third, there are a variety of libraries available for use. This is also the most important part of Python programming.
There are a large number of libraries available for use, saving a lot of car wheels you need to build.
1. With the guarantee of a large number of libraries, the code is very short and the same function, and the implementation of c or other languages is much longer and more complex than the code of scripts such as python. Using python saves a lot of effort.
2. A wide range of data types such as list, dict, and tuple.
3. Text Processing is very convenient. If you only use fortran, you are very confused about how to obtain the time, calculate the day after tomorrow, and even more confused about the four or two years, it is very convenient in python.
4. Regular Expressions are powerful and have never been used before. It is only known to do things on linux. python supports regular expressions.
5. Many libraries are available for network programming.
The second thing I did after learning python was to capture some web page data. After I searched the internet, I wrote one. The Python programming implementation code is very short and very simple. Everything such as ftp and http is ready for use.