Python usage Instructions

Source: Internet
Author: User
Keywords Written is
Tags allowing applications beginners class clear code computer design

Python is an object-oriented, literal translation of computer programming language. The python syntax is simple and clear, with a rich and powerful class library. Python's design insists on a clear and uniform style, making Python a readable, maintainable, and widely used language that is popular with many users. Recently on Weibo, I saw Liaoche's new Python tutorial, which describes the installation and use of Python in humorous language and video, allowing beginners to quickly master the programming language of Python.

Python is a programming language written by the famous "Uncle Turtle" Guido van Rossum during Christmas in 1989 to pass the boring Christmas.

Now, there are almost 600 languages in the world, but the popular programming language is so 20来. If you've heard of the Tiobe list, you know the general popularity of programming languages. This is the most commonly used 10 programming languages in the last 10 years:

In general, these programming languages have different advantages. C language is a language that can be used to write the operating system close to the hardware, so the C language is suitable for developing programs that pursue speed and give full play to hardware performance. Python is a high-level programming language for writing applications.

When you start a real software development in one language, you need a lot of basic, already written stuff to help you speed up development, in addition to writing code. For example, to write an e-mail client, if you start from the bottom to write the network protocol-related code, it is estimated that Yinianbanzai can not develop. Advanced programming languages often provide a more complete codebase that allows you to call directly, for example, an SMTP library for e-mail protocols, a GUI library for the desktop environment, developed on the basis of these existing code bases, and an email client can be developed in a few days.

Python provides us with a very sophisticated codebase that covers a wide range of content such as networks, files, GUIs, databases, text, and is vividly referred to as "built-in battery (batteries included)". With Python development, many features do not have to be written from scratch, directly using ready-made.

In addition to the built-in libraries, Python has a large number of third-party libraries that others have developed for you to use directly. Of course, if you develop code through a good encapsulation, it can also be used as a third-party library for others.

Many large websites are developed in Python, such as YouTube, Instagram, and domestic watercress. Many big companies, including Google, Yahoo, and even NASA, are using Python heavily.

Uncle Turtle's positioning for Python is "elegant", "clear", "simple", so Python programs are always easy to understand, beginners learn python, not only easy to get started, but also in the future in-depth, you can write those very very complex programs.

In general, Python's philosophy is simple and elegant, try to write code that is easy to read, and write as little code as possible. If a veteran programmer shows you the arcane, tens of thousands of-line code he writes, you can laugh at him heartily.

What types of applications is Python suited to develop?

The first choice is the network application, including the website, the backstage service and so on;

Second, many of the daily needs of small tools, including the system administrator needs of the script tasks, and so on;

Another is the development of other languages of the program packaging, easy to use.

Finally, the weakness of Python. Any programming language has its drawbacks, and Python is no exception. What are the drawbacks of Python?

The first drawback is that the slow speed, and the C program is very slow, because Python is an interpreted language, your code in the execution of the line will be translated into the CPU can understand the machine code, the translation process is time-consuming, so very slow. and C program is run directly before the CPU can be compiled to execute the machine code, so very fast.

But a lot of apps don't have to run that fast because the user doesn't feel it at all. For example, to develop a Web application that downloads MP3, c program run time need 0.001 seconds, and Python program run time need 0.1 seconds, slow 100 times times, but because the network is slower, need to wait 1 seconds, you think, users can feel 1.001 seconds and 1.1 seconds difference? This is like the F1 car and ordinary taxis on the third ring road in Beijing, the same reason, although the F1 racing theory as high as 400 kilometers per hour, but because the third ring road traffic jam only 20 kilometers per hour, so, as a passenger, you feel the speed is always 20 kilometers.

The second disadvantage is that the code cannot be encrypted. If you want to publish your Python program, which is actually to publish the source code, this is different from C language, C language does not need to publish the source code, only need to compile the machine code (that is, you are common in Windows Xxx.exe file) released. It is impossible to reverse the introduction of C code from machine code, so there is no such problem in any compiled language, and the language of interpretation must be published.

This shortcoming is limited to the time you want to write software that you need to sell to someone else to make money. The good news is that the current internet age, relying on the sale of software licensing business model less and more, relying on web sites and mobile applications to sell services more and more mode, the latter mode does not need to give the source code to others.

Besides, now the open source movement is in full swing and the spirit of free and open the Internet is consistent, the Internet has countless very good like Linux Open-source code, we must not overestimate their written code really has a very large "commercial value." The more important reason those big companies don't want to be open is that the code sucks, and once it's open, no one dares to use their product.

123 Next
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.