What Python can do

Source: Internet
Author: User
Tags processing text

Second, Python is only suitable for testing?

As to what kind of language Python is, it is not intended to speak of terms such as objects or classes. We can start by looking at the areas in which Python is used today:

    • Telecommunications Infrastructure (Twilio)
    • payment System (PayPal, Balanced Payments)
    • Neuroscience and Psychology
    • Numerical Analysis and Engineering (NumPy, Numba)
    • Animation (LucasArts, Disney, DreamWorks)
    • game Backstage (Eve Online, Second life ...)
    • Email Infrastructure (mailman, Mailgun)
    • Media Storage and processing (YouTube, Dropbox)
    • Operations and Systems Management (Rackspace, OpenStack)
    • Natural Language Processing (NLTK)
    • machine learning and computer version (Scikit-learn, Orange)
    • Security and Penetration Testing (Ebay/paypal)
    • Big Data (Disco, Hadoop support)
    • Search System (ITA, UltraSEEK, and Google)
    • Internet Infrastructure (DNS) (BIND)

Python, which is widely used in so many areas of the company, is just used in their testing department? At least according to rumors on the internet, watercress, youbute, and Dropbox are all websites built with Python as the main language. Python's powerful capabilities (for example, network processing power, and various expansion packs) allow programmers to focus on the implementation of business rather than on the details of memory management, interface design, and so on.

In fact, Python's most common application scenario is:

1. Use Python to quickly prototype the program (sometimes even the final interface of the program, you will like WxPython),  
2. For those parts that have special requirements, rewrite them in a more appropriate language (especially C + +).

Because of the natural connection between Python and C, the mutual invocation between them is never a problem. In particular python how to call C in "programming Python" of Chapter 22. Extending Python section is introduced. Python's call to C's dynamic/static library is not a complex thing. In fact, Python's native regular expression library is implemented in C language.

Third, Python is just a scripting language?

python does have the ability to complete scripting languages (using a cleaner approach). Shell tools are often run from the command line to perform tasks such as processing text files and invoking other programs. Python can do a lot more.

Some experts say Python is a full-stack development language for big data, and Python is the most popular language in the areas of" cloud infrastructure "," DevOps "," web crawler "and" Data processing ".

Microsoft, who has been slow to open source software for 2015 Pycon, announced a high-profile announcement to improve Python's programming experience on Windows, including Visual Studio support for Python, optimized python The C extension is compiled on Windows, and so on. The brain complements the future of Python as a scenario for Windows default components.

Iv. Python's NB

as expressed in the Zen of Python (note 1), simple elegance has gone deep into python bone marrow. It is for this reason that Python is thought to be easy to use, fast to develop, and extremely readable, and it is these features that make it more likely that internet companies will be using it because rapid release is fundamental to their survival. In practice, programmers can intuitively find that the code written in Python is usually much shorter than the same C + + or JAVA program.

python

#!/usr/bin/pythona = 0while(a <= 10):    a = a + 1 print ‘The number is ‘+aprint ‘while is end‘

C++

# Include <iostream>int Main () {int a = 0; while (a <= 10) {a = a + 1; cout<< "the number is" <<a<<endl;} cout<< "while is End" <<ENDL;}    

Can do this because Python

4.1 Variables do not need to be declared

This is really convenient. The Declaration and definition of a variable must seriously interrupt the thinking of the code logic and the hassle of alignment. Memory management, which is simply the most common mined-out area in C/s + + programming, is no longer a problem due to the omission of declarations.

4.2 Shrink and then not  {  }

python is to manage the structure of the code in a pinch. This has his advantage: programmers must have missed the experience of writing ' {' or '} '. If the compiler or interpreter used is excellent, the missing ' {'} is really easy to add. But if that's not the case, go for a stroll in the complex code. Because the compiler may notify an ' error ' error message, the location of the error may be far from where you really are wrong (108,000 miles?!). )。 In contrast, for Python, which is managed in a way that is indented, programmers do not have to think about this problem. The Python code is a lot clearer in the case of a complex nesting of Python, which is indented in chunks.

python

class python:    def Hello(self): print ‘Hello‘ def count(self, n): in = 0 while( in <= n): in = in + 1 print in

C++

class python{public: void hello ( void) {Cout<< "Hello" <<endl;} void count (int N) {int in = 0; while (in <= N) cout<<in <<endl; }};

in comparison, Python's code is more able to distinguish its hierarchy, and for C + + such code, although it can be compiled successfully. However, for its future maintenance, it will cause endless pain. From this, you can see that Python's syntax is concise. At the same time, Python's ability to find errors is also very strong. In general, the Python interpreter can pinpoint the location and cause of the error.

The only thing that's not done with Python's necking is to indent 4 spaces without specifying one.

What Python can do

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: info-contact@alibabacloud.com 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.