Zero basis to learn Python should learn what introductory knowledge

On the question of how to learn Python quickly from a zero base, there are many questions and answers on Baidu. I think from the perspective of personal self-study, should be understood from the following aspects:

1 Why choose to learn python?

Statistically zero basis or non-professionals to learn python is more, according to the HackerRank developer survey report in May 2018 (see chart). Python ranked first and became the most popular programming language.Python is known for its elegance and simplicity, with a low entry threshold, it can be engaged in Linux operation and maintenance, Python Web site engineers, Python automated testing, data analysis, artificial intelligence, and other positions, and salaries are on the rise.

2 Getting started with python requires those preparations?

2.1 Mindset preparation. Programming is a skill and can be described as a craft. Like calligraphy, painting, musical instruments, sculpture, etc., behind the pure skill must have paid a long time of repeated practice. Don't believe in a few weeks of quick fixes, and don't be in a hurry. The world of programming is vast, so please keep a reverent mind to learn, and take every line of code you write, even every character, seriously. Gather your mind and set off towards the world of programming. The first step is crucial and relates to whether a beginner goes from introductory to proficient or from introductory to giving up. Pick the right path to get started and stick to it.

2.2 Configuring the Python learning environment. Whether to choose Python2 or Python3 is a question many people struggle with when getting started. It's just that the programs are incompatible, but the ideas are not that different, and the syntax doesn't change much. It doesn't really matter if you choose either one to start with. If you still can't decide, go with Python3, it's the future.

How to choose an editor? Again, we recommend pycharm community edition, which is easy to configure, powerful, time-saving, beginner-friendly, and completely free! Other editors such as notepad++, sublimeText 3, vim and Emacs are not recommended.

Operating environment? Python supports all the major operating platforms, windows, mac, and linux, and both run Python very well, and both come with a Python environment by default.

2.3 Choosing books for self-study. The books I recommend range from the very basic to the very advanced, and I recommend reading them in order of preference:

2.3.1 A Concise Tutorial on Python. This is a concise, straightforward, no-nonsense tutorial on getting started with Python. Even if you don't have the basics, you can read it in two days like a novel. It's a great way to get started and get a quick overview of the syntax.

2.3.2 Python Tutorial by Xuefeng Liao. Mr. Liao's tutorial covers all aspects of Python knowledge, the content is more systematic, there is a certain depth, there is a certain foundation after learning will have more gains.

2.4 Learning to install packages. Python has a lot of extension packages, and there are two ways to install them:

2.4.1 Use pip or easy_install.

1) Find the package you need on the web and download it. eg. rsa-3.1.4.tar. gz;

2) Unzip the file;

3) Command line tool cd to switch to the directory of the package you want to install, find the setup.py file, and then type python setup.py install

2.4.2 Not use pip or easy_install, directly open the cmd and type pip install rsa.

3 The upgrade phase requires persistence and stamina.

After completing the basics of the introductory phase, you often get stuck in a bottleneck, where it's difficult to further improve your programming by watching tutorials. At this point, what is needed is repeated practice, a lot of practice. You can start from the book examples, homework problems to write, then write small program fragments, and then write a complete project. We have collected some practice problems and websites. You can choose the suitable exercises to do according to your stage. It is recommended that it is best to pick one or two series to focus on completing rather than shallow.

3.1 Do more exercises. Recommended website exercises:

crossin programming classroom examples: Compared to the programming classroom basic exercises focusing on a single point of knowledge,

programming examples of training on the basics of the integration;

hackerrank: Python part of the difficulty of the gradual, in line with the learning curve

experiment House

codewar: a community-based programming practice site, with content ranging from easy to difficult;

leetcode: preparation for programming interviews, which is a bit difficult for beginners;

niuqi.com: provides written test questions from BAT and other big companies;

codecombat: provides programming while playing games;

projecteuler: pure programming practice site;

rookie tutorial 100 examples: py2 based basic practice;

3.2 More communication when you encounter problems.

3.2.1 Make good use of search engines.

3.2.2 Ask for help from major websites. recommended

stackoverflow: this is a knowledge base for programmers;

v2ex: a very good programming community in China, not only contains the program, but also the programmer's life;

segmentfault: a programming Q&A-based website;

CSDN, Zhihu, Jianshu, etc.

3.2.3 Join related QQ, WeChat groups, Baidu know. You can always ask for advice if you don't understand.