Wen: Sun snow
Source: Python Technology [public ID: pythonall]
In October 2020, The TIOBE ranking surpassed Java, the first time in history that Python surpassed Java, once again making many friends interested in Python. Today, we will sort out several stages or levels of learning Python, hoping to help you continue to evolve
This article originated from a question on Zhihu: how to learn Python by yourself, and how long will it take? , gave an answer that was rewritten this time and read as follows:
Read a lot of answers in the answer area, feel very professional and detailed, feel that how long to answer the question, need to answer what is the goal of learning this question, here will be divided into entry, advanced, in-depth and the ultimate four parts to explain
Getting started: Just getting to know
Python is already the most popular language, especially in the case of data analysis and machine learning, Python is also favored by children’s programming, so many students for various reasons, just need to know
So you need to understand the Python environment setup, understand the basic operating system, such as environment variables, command-line tools and so on, and then install Python, and you can run Python from the command line, and perform simple operations
Next, in the file file, say print(Hello World), save, execute
That’s the beginning. The whole process takes less than an hour
For beginners, it is recommended to use the command line. Many teachers recommend integrated development tools such as Anaconda and PyCharm. Although they are powerful and have beautiful interfaces, they are not too informative, such as distracting and do not take advantage of the Understanding of the Python environment
Advanced: Complete simple tasks
To complete some simple tasks or writing scripts, such as processing Excel, Word, text data, do some file processing operations, write a small program for your own entertainment (not wechat, Alipay, Toutiao, etc.)
You only need to understand basic Python syntax, such as variable definitions, basic data structures, judgment statements, loop statements, method definitions, and so on
Also, learn about software packages such as OpenPyXl (see Excel Artifacts — OpenPyXl) for processing Excel
Python-docx is used to process Word
Python has a built-in OS module for handling file systems, the Pygame simple game pack (see “Being a Hardcore Dad, I Use Python”) for making fun games, and more
At this stage, as long as you continue to practice for about a month, you will be able to master it, make what you want, and improve your work efficiency
There was a communication equipment engineer in our company who began to learn Python for the convenience of debugging the host computer. In less than a year, he not only solved problems in his work and won awards, but also became the Python expert of the department and often guided others to learn Python
Advanced: Build application systems
If you want more people to use your programs, not just your own, you need to build a system or application.
The Web system
You’ll need to learn Flask (see Introduction to Web Development Flask) or Web frameworks such as Django
More importantly, you need to understand the basic knowledge of the network, such as Http, domain name, cloud server and so on
Knowledge of database processing, such as Sql statement, Mysql database, or Sqlite database
Security related knowledge, such as Session, token, OAuth authentication mechanism (please refer to OAuth2.0 Introduction)
Service deployment knowledge or skills to make your application available to more people over the network (see Deploying Flask Applications)
A desktop application
For example, if you want to use Windows or Linux, you need to be familiar with the operating system
And learn wXPython, PythonWin, PyGTK, PyQt and other software packages, like WXPython has a powerful and rich power, and support cross-platform desktop applications, so that you do the program has better adapt to the environment
For Windows, see “Bus Alarm clock — No More Waiting for the Bus”], which describes how to build a Windows timed task and how to package Python programs as executable files
In order to achieve the goal of building a system, in addition to learning Python language itself and related software packages, it is more necessary to learn the knowledge of network, operating system, programming ideas, design patterns and other aspects
It takes at least six months to learn from scratch, and one to two years to reach mastery and apply it in a commercial project
In depth: Data analysis and machine learning
Python is an almost universal language, especially for real data analysis and machine learning, and is beloved by data scientists for its idea of doing more with less code.
If the goal is to do data analysis, first of all, you need to understand the thinking and process of data analysis (see “This Data analysis Report, Surprisingly, did not write a line of code”).
Then, I need to learn knowledge or skills in data collection, data collation, data visualization and so on:
- The data collection
It is basically a crawler that extracts data from the web for analysis. Related frameworks or software packages include Scrapy, Selenium, and Requests
- Data sorting
Numpy is used to clean, parse, and convert data to Pandas. It is used to clean, parse, and convert data to Pandas. It is used to clean, parse, and transform data to Pandas
- Data visualization
Only when the data can be intuitively felt by people can the value of the data be more fully played. It is an essential link of data analysis to intuitively present the data through the bar chart, pie chart, radar chart, scatter chart and other intuitive and effective images. Related frameworks and software packages include Matplotlib, Pyecharts, Dexplot, etc. I’ve written a document about the combination of Flask and Pyecharts for Python Flask Data Visualization.
If your goal is to do the data analysis, begin at the beginning and keep practicing, for three months, you can do the basic work, this is a data analysis related to the work, is not a problem, if you want to study, the principle of data analysis, and even machine learning algorithm, and can be used freely, not a three to five years estimates that it’s hard to do
Ultimate: Become an expert
In fact, there is a common rule for becoming an expert in any field: the 10,000-hour rule, even if you want to become an expert in Python
The reason python is the preferred programming language in so many domains is not that Python is at the heart of so many domains, but that Python can be used as an idea and implementation tool for solving problems
Therefore, if the goal is to become an expert, choose a field in which Python can be used, such as systems construction, data analysis, machine learning, video games, and so on
Getting the most out of Your Python skills in that area may be a shortcut to becoming an expert
If you ask how long it will take, it depends on fate.
conclusion
No matter what your goal is, will it require constant learning and practice
Learning is divided into three stages. The first stage is learning, that is, understanding and learning related knowledge; The second stage is teaching, that is, learning from a teacher or textbook. The third stage is practice, this stage is the most important, need to practice more
I hope this article has given you some inspiration on your learning journey and I wish you a speedy realization of your goals.
reference
- Mp.weixin.qq.com/s/djrPr34u0…
- www.zhihu.com/question/30…
Welcome to follow the wechat official account: Python technology, here we have personally written 100 days of actual practice, there are all kinds of interesting programming practice, there are all kinds of learning materials, and a large group of lovely friends to discuss with each other.