Python Learning (Introduction)

Source: Internet
Author: User

"Python", in all computer books, to see this noun feel very cordial, I have a strong interest in English, and computer want to have a deeper understanding, I decided to learn the following Python this great god of the language.

At the beginning of my own understanding of python, coupled with the corresponding computer-based knowledge, I would like to lead you to experience a language slowly, understand the story behind it, or Lenovo to other philosophical connotations and so on. I also hope that you can give me some advice. The rest of us are not talking more, get to the point. I recommend two books, one is "learning python", the other is "programming Python", these two books are English version, I personally like to read English version, always feel the translation of the poor to ask and understand the wrong place. If the choice of Chinese is not related, as basic learning is enough, if you want to delve into, it is not a book can help you, but to practice, find information, experience it.

Speaking of which, we will ask what Python is for, our programming language is like java,c/c++. NET, or is it like a scripting language like Shell,perl? In fact, no language is the same, is the product of development, we do not rigidly adhere to its grammar or become a tool, but to think why there is this language, why it has survived, why in this age so important! This is the ultimate goal of learning. Here I do not want to say it is used in which field, but through learning slowly to learn more about it, in order to find its strong place.

Different languages will have a process of development, the process is translated into version number, it is understood that the higher version number will be relative to the previous version of security, the function is increased. So first choose a version to learn, in Python, it is interesting to have two more important segmentation points, this segmentation point is due to the user volume. The choice of version is chosen by your company or your preference, but you are a beginner and you will always be confused between versions. Here, give you some reason to choose the version. Here are some suggestions:

(1) Select 3. X: New features, change-of-meaning versions

If you're using Python for the first time, you don't need to use 2. X code. I encourage you to use 3. x version of Python. As you can understand, it removes all the long-standing shortcomings and cuts out some outdated features,

At the same time, it retains the original classic core ideas and new tools. such as seamless Unicode models, a wider range of generators, functional techniques, and popular libraries and tools.

(2) Select 2. X: Stable

Because of the 2. X is widely used, stable, and does not change at all.

So when do we choose the neutral version, the good news is that Python has the same basic point in both versions, and very few people find that they are different. When you are fully finished, you will know how to write a neutral version. In the next section, I'll separate the details to understand the charm of the Python language. Mainly include:

The first part: basic understanding of some python related issues, such as why to use it, its usefulness and so on. This paper mainly introduces the background knowledge of Python's stratigraphic technology thought, and several ways to run Python language, which can let you run some examples.

The second part: Start learning Python language, learn the main built-in object types, deep use numbers, lists, dictionaries and so on. You can also use some tools to do it, they are the heart of every Python script. This part is the base part because it lays the groundwork for the next few pieces. We also explore dynamic typing and reference (references), which is the key to learning Phthon.

Part III: Introduction to Python's statements, basic syntax, and some tools (Pydoc system), with a preliminary understanding of the iterative concept (iteration concepts).

Part IV: We will look at some of the more high-level program structure tools. function (Functions) is a simple way to reuse and avoid code redundancy. We also study scope rules (scoping rules), parameter passing techniques (argument-passing techniques), the infamous ^ (LAMBDA). Understand Iterators (iterators) from a functional programming perspective, introduce user-defined generators (generators), and learn to manage the run time of Python code.

Part V: Phthon's Module (modules), which organizes statements and functions into a large component, learns how to create, use, and reload modules, import of related packages, new namespace packages and--__name__ variables in version 3.3.

Part VI: We discuss Phthon's object-oriented tool, class (optional, but an effective way to personalize and reuse the code structure). As you can see, most of the classes are reused and we have learned to think. OOP in Python looks for a name in a Connection object with a special first parameter in the function. It is optional, but Python's oop is simpler than others, and it can save development time in large-scale development.

Part VII: Python's exception handling model and statements, plus development tools for writing large programs (debug (Debugging) and test tools (testing tools)). Although an exception is a lightweight tool, it follows the concept of a class because user-defined exceptions should also be classes. There is also a high level of content, contextual management (context managers).

Part VIII: Some advanced features, Unicode and byte strings, management properties tools such as attributes and descriptors, functions and class decorators, meta-classes (metaclasses). This part of the content is selected, because not all programmers need to understand this knowledge. In addition, people who develop APIs can understand the international text or binary data that is being processed. This part is also the largest part of optional learning.

The ninth part: Some suggestions for installing Python on different platforms; running Python3.3 windows; changes between versions and some exercises.

Python Learning (Introduction)

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: 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.