Way of learning Python

Introduction to Python's
Python provides us with a very sound foundation code base, covering a lot of the content network, file, GUI, database, text, etc., is vividly called "built-in battery (batteries included)". Many features do not have to be written in Python development from zero, ready to use directly.

In addition to the built-in library, Python there are a lot of third-party libraries, which is developed by others for what you use directly. Of course, if you use someone else code developed by a very good package, it can be used as third-party libraries.

Many large sites is to use Python developed, such as YouTube, Instagram, as well as domestic watercress. Many large companies, including Google, Yahoo, and even NASA (National Aeronautics and Space Administration) are heavily used Python.

Turtle t to Python's position is "elegant" and "clear", "simple", so Python program always looks easy to understand for beginners to learn Python, not only easy entry, and deep down in the future, you can write those very, very complicated program of.

In general, Python's philosophy is simple and elegant, try to write code that is easy to understand, try to write less code. If a senior programmer to write to you to show off his obscure, at every turn tens of thousands of lines of code, you can enjoy laughing at him.

That Python for what types of applications it developed?

The preferred network applications, including Web sites, back-office services, and so on;

Followed by many gadgets daily needs, including system administrators need a script task, and so on;

The other is the other language development program re-packaged, easy to use.

Finally, talk about the shortcomings of Python.

Any programming language has its disadvantages, Python is no exception. Said advantage, that Python What are the disadvantages?

The first disadvantage is running slow, and very slow compared to C program, because Python is an interpreted language, your code will be executed when translated into machine code line by line CPU can understand, this translation process is very time-consuming, so it is slow. The C program is compiled directly into machine code that can be executed before running the CPU, it is very fast.

But a large number of applications do not need such a fast speed, because users do not feel it. For example, the development of a downloaded MP3 web applications, runtime C program needs 0.001 seconds, and run-time Python program needs 0.1 seconds, slower than 100 times, but the network more slowly, need to wait for one second, you want, you can feel the difference between 1.001 seconds and 1.1 seconds to do? It's like F1 racing and ordinary taxis in Beijing ring road with the truth, even though F1 racing theoretical speeds of up to 400 kilometers, but due to the Third Ring Road traffic jam of 20 km per hour, therefore, as a passenger, you feel the speed It will always be 20 kilometers.

Do not care about the running of the program

The second drawback is that the code can not be encrypted. If you want to publish your Python program, in fact, released the source code, which is different from the C language, C language source code is not released, just after take compiled machine code (that is, your common on Windows xxx.exe file ) release out. Anti-launched C code from machine code is not possible, therefore, any compiled language, do not have this problem, but interpreted language, it must publish the source code out.

The only drawback that you need to write software to sell when others make money. The good news is the age of the Internet, by selling software licensing business model is less and less, and rely on websites and mobile applications and services to sell more and more models, the latter mode does not require the source code to others.

Besides, the open source movement is now in full swing and the Internet free and open spirit is the same, there are numerous very good like Linux open source codes on the Internet, we must not overestimate their own code to write really have a very big "business value". More important reason is that large companies do not want to open the code is code written sucks, once open, no one would dare to use their product.

How can your effort to crack the code rotten

Of course, Python as well as several other small drawback, please ignore their own, not list them.

Published an original article · won praise 0 · Views 61

Guess you like

Origin blog.csdn.net/xuyunchao1996/article/details/104710349