Home  >  Article  >  Backend Development  >  The different stages of learning Python

The different stages of learning Python

巴扎黑
巴扎黑Original
2017-08-03 17:47:312370browse

Foreword

Wang Guowei divided reading into three realms in "Human Words": "Those who have achieved great things and great scholars in ancient and modern times must pass through three realms: 'Last night the west wind withered the green trees. "Go up to the tall building alone and look at the end of the world." This is the first state. "My clothes are getting wider and I don't regret it. I am so tired." This is the second state. That person is in a dim light. This is the third situation. I haven’t had much time since I started Python, so writing such a big topic will definitely trigger various criticisms. Of course, I don’t want to make a big news. I would like to make a simple summary based on my own learning process, and also briefly introduce some good books corresponding to these three stages.

Text

Python has a wide range of uses and different programs. Programmers use it in different fields. Different programmers package their own codes into libraries for use by other programmers, thereby reducing the need for reinventing the wheel. The use of various libraries, coupled with the flexibility and readability of Python itself, makes it easy to Writing, more and more people are using it. Tiobe statistics the usage rate of programming languages ​​is as follows: Python has risen by 3 places in the usage rankings in one year, and if major companies can master Python when recruiting employees, they will definitely It is a plus point because Python has great advantages in text processing and small program writing. Some time ago, a friend asked me to help change the color of their company logo. The first thing that came to my mind was to use Python. The female vote asked me to To help her preprocess big data, the first thing that comes to mind is still Python, etc. Of course, I am not saying that other languages ​​​​are not good, nor is it to discuss which language is better, but Python is indeed a language that makes people happy. Let’s briefly talk about my division of realms in the Python learning process and recommended books
The different stages of learning Python

##The first stage: Beginner, master the syntax of Python and the use of some common libraries

  • Here I first recommend Liao Xuefeng’s online book, which is the Python2.7 version. This book is suitable for reading from scratch. As a developer, in addition to basic grammar, this book It mentions some other commonly used libraries. After reading a lot of things written by Teacher Liao, I feel that his ideas, as well as the height, generality and principle of writing blogs and books are very good. After reading this book, I believe that You can start writing a lot of things, and you can play with the Python interpreter to your heart's content.

  • ##There is also a book "
  • Python Reference Manual

    ", which is also available. It is very useful. It covers basically all aspects of Python. It can be used as a Python dictionary to check how to use it. It is very easy to use.

  • The best way to master a language is to use it. I use it, so I think brushing Leetcode while learning grammar is one of the fastest ways to master Python
  • Many people only need to use Python as a script or write some small programs to process text. If so, it is enough to reach this stage. This stage can already help us accomplish many, many things. But if you are a professional learning Python, I am afraid you still need to work hard to upgrade: First of all, most people in China learn Python after learning other languages ​​​​(C, C++, Java, etc.), so Python is different from these languages. , that is, pythonic things take some time to learn, understand and master; in addition, it also takes a long time to master the library architecture of your own field; finally, if you want to complete a Python project independently, the layout of the project , publishing, open source, etc. are all issues that need to be considered.

The second stage: Intermediate, master the libraries in your own specific field, master pythonic writing, and be very familiar with the characteristics of Python

    The first book recommended is "Writing High-Quality Code - 91 Suggestions for Improving Python Programs". This book briefly mentions the file layout of Python projects, and more summarizes how to write pythonic code. In addition, it also introduces some commonly used libraries.
  • If you want to understand Python in depth, sometimes it is important to look at the source code of Python. By reading the source code, you can thoroughly understand the core mechanism of Python. Here is recommended Python Source Code Analysis - An In-depth Exploration of Dynamic Language Core Technologies". I have not finished reading this book. I just read the relevant chapters when I need to understand a certain function or data structure of Python in depth, and I feel that it has benefited a lot.
  • There must be a lot of books and materials in your own field. For example, there are many architectures for web development. Only by understanding and familiarizing yourself with all the architectures can you weigh the pros and cons when choosing, and then have a deep understanding of a certain architecture. some structures.
  • After this stage, you can write pythonic code, pass the PEP8 inspection, and contribute to the open source community. You can write a Python file very well, but if you want to use When developing a large-scale project in Python, there are still many things that need to be mastered, such as project documentation, project release, downloads, project performance and cases, etc.

The third stage: advanced, focusing on the entire project, considering document, distribution, performance optimization, etc.

  • Currently I have only read one book "the hacker guide to python" , I read the English version. This book provides a lot of detailed introduction to the project layout, documentation, performance, release, etc. I think the writing is still very good, but I need to read it a few more times.

  • For most people, it is difficult to have the opportunity to start a meaningful large-scale engineering project from scratch, so you can use Python to implement some simple functions, simple projects, this inspiration You can search on Zhihu or Quora. Many seniors have shared their experiences.

Start from the overall situation, plan the layout of the project, set the corresponding documentation instructions, provide methods for downloading and installing the project, and bring several demos, each class and each function. Each line of code has been carefully considered and written into a pythonic program. I believe that Python will be at our fingertips at this time!

Summary

This article is just what I think are the stages of learning Python. From my humble perspective, there must be too many shortcomings, and I am also a beginner and advanced Python user. Depending on the level of a programmer, writing this article can be regarded as a goal set for myself.

The above is the detailed content of The different stages of learning Python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn