python zero-based introductory study guide first lesson

If you use the computer to do a lot of work, and finally you will find that there are some tasks you prefer to be treated in an automated fashion. For example, you want to perform a large number of text files Find / Replace, or in complex ways to rename a large number of pictures and finishing. Maybe you want to write a small custom database, a special GUI application, or a simple game.

If you are a professional software developer, you may have to use several C / C ++ / JAVA class library, and found generally write / compile / test / re-compile cycle is so long. Maybe you are writing test cases for these libraries, but found it to be a work of agitated people. Or you have completed a program can use an extension language, but you do not want to design and implement a whole new language for this purpose again.

Then Python language exactly what you need.

Although you can to handle some of these tasks by writing Unix shell script or Windows batch files, but Shell script is more suitable for mobile text file or modify data, not suitable for writing GUI applications or games; although you can use C / C ++ / JAVA programming, but even write a simple first-draft program is also possible to spend a lot of development time. In contrast, Python easier to use, both on Windows, Mac OS X or Unix operating system, it will help you complete tasks more quickly.

Although Python is easy to use, but it is a complete programming language; compared with Shell script or batch file, which provides more structure and support for the preparation of large programs. On the other hand, Python provides more error checking than C, and as a  high-level language , its built-in support for advanced data structure types, such as: flexible arrays and dictionaries. Because of its more general data types, Python than Awk or even Perl are more applicable to problem areas, at least most things in Python as simple as with other languages.

Python allows you to divide the program into different modules that can be reused in other Python programs. Python provides a number of built-in standard modules, you can use it as the basis of the program, or as an example to learn Python programming. These modules provides features such as file I / O, system calls, Socket support, and even similar Tk graphical user interface (GUI) toolkit interface.

I point to learn more exciting content

Python is an interpreted language, because without compiling and linking, you can save valuable time in program development. Python interpreter can be used interactively, which makes the performance test language, written in the temporary program or bottom-up test program development method is very easy. You can even use it as a desk calculator.

I point to learn more exciting content

Python allows programs written in a compact and readable. Programs written in Python are typically more short than the same C, C ++, or Java programs, this is because of the following reasons:

* Advanced data structures allow you to express complex operations in a single statement; 

* group of statements using indentation instead of beginning and ending braces to organize; 

* no need to declare variables or parameters.

Python is  extensible  : if you know C programming language can easily be added as an interpreter built-in function or module, or in order to optimize the performance bottlenecks as, or Python program with only a binary form of libraries (such as a professional business graphics library) connected. Once you truly master it, you can Python interpreter integrated into a C application, that and treat it as an extension or command language.

Incidentally, the name of the language comes from the BBC's "Monty Python's Flying Cirecus" program, and reptiles do not have any relationship. Monty Python references in the document allusions not only feasible, but should be encouraged!

Now you have to Python excited now, probably wanting to sample some more details! The best way to learn a language is to use it, this guide is recommended that you use the Python interpreter while being read to practice.

Published 29 original articles · won praise 9 · views 30000 +

Guess you like

Origin blog.csdn.net/HAOXUAN168/article/details/104087294