How can I understand python? -Python tutorial

Source: Internet
Author: User
Currently, java-selenium-jenkins is used to perform some tests. I have learned a little bit about Python before, but I have not been able to understand the essence because of the low time and lack of depth. I have always heard that Python is a great method. please answer. Currently, java-selenium-jenkins is used to perform some tests. I have learned a little bit about Python before, but I have not been able to understand the essence because of the low time and lack of depth. I have always heard that Python is a great method. please answer. Reply content: The truth is that the essence of python is import! Haha! Python is well-thought-out. Well. After careful consideration, I made a Python 3. Who knows who to use?
Import is in the palm of the hand. I have it because c is good and python is good.
Recently I was reading the python source code, and it seems like glib. so I often think that python is actually a natural extension of c. Unlike other languages, python directly binds the hard-hitting c libraries. On this basis, python provides stable and reliable object-oriented encapsulation, which is more elegant than glib and more robust than c ++.
For c programmers, it is actually a more natural development.


Don't hit me, I just paste a picture
Other languages are anti-intellectual compared with python. I often give this example to people with a little programming basics when recommending python:
How do I exchange the values of two variables?
C ++:

void swap(int &a, int &b){  int temp;   temp = a;   a = b;   b = temp; } int main() {  int a = 1, b = 2;  swap(a, b);}
No good language, no bad language, only the most appropriate language!

The programming language is actually the same as the natural language. I speak Chinese in American villages, English in Chinese counties, Thai in South American tribes, and Maya in the jungle in Southeast Asia, I think it hurts a lot, don't I?

So:
In rural America, the English language is good. in Chinese cities, the Chinese language is good. in South America, the Spanish language is good. in the jungle of Southeast Asia, the Thai, Burmese, and Cambodian languages are good...

Just map this truth to the programming language. It cannot be too absolute. it depends on what it is used. This is just the tone between programmers (zhuang) Kan (bi), I also like to follow the trend, like "php universe first", "erlang great law", 23333

  • In Imperative Programming
It is best to write code in Python, just as easy as writing a pseudo code.

One of the most important reasons is that he does not have other languages and has so many complicated features. I use Python not to be as aggressive as writing Ruby, so I am afraid that a syntax sugar in Ruby will be triggered accidentally. (Although Ruby is one of the languages I have seen that can use the least amount of code to complete complex projects, I also love Ruby)

As for C #, Java, PHP5, Nima is the three brothers. it looks very similar and the user experience is similar. we understand the industrial language.

  • Functional Programming
Compared with imperative languages, Erlang is used only. compared with imperative languages, it can be said that it is a further improvement in the way of thinking. it is the development at a more systematic level and in the overall situation, but using it as a single-host command line program always seems like a cool-killing tool.


Above

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.