Home  >  Article  >  Backend Development  >  How to learn python programming

How to learn python programming

(*-*)浩
(*-*)浩Original
2019-05-29 16:02:0311643browse

This is an introductory guide to Python, aimed at students who have no programming experience and want to learn Python from scratch. Whether your starting point for learning is interest-driven, expanding your thinking, or work needs, or you want to change careers, you can use this article as a reference.

How to learn python programming

#In this era of information explosion, there are thousands of search results using the keyword "Getting Started with Python". Many novice players will inevitably hit here and there with a hammer and a stick, and end up reading a lot of articles, but still haven't crossed the threshold of being a novice.

Combining our own learning experience and communication and understanding with many self-learners, we have compiled a highly operable self-study route, and also collected various forms of high-quality Python learning resources for you who have not yet started or A reference for students who are just getting started.

MENTAL PREPARATION

Programming is a technology, it can also be said to be a craft. Just like calligraphy, painting, musical instruments, sculpture, etc., behind the proficiency of skills must be a long period of repeated practice. The world of programming is vast, so please keep an awe-inspiring attitude to learn, and take every line of code and even every character you write seriously. Pack up your mentality and set off towards the world of programming.

Entry stage

The first step is crucial, whether it is related to whether beginners go from getting started to becoming proficient or from getting started to giving up. Choose a suitable entry path and stick to it.

1.1 Configure Python learning environment

Python2 or Python3?

Many people are wondering whether they should learn Python2 or Python3 when getting started. This is not really a problem. I've never heard of anyone being a Python2 programmer or a Python3 programmer. The two are just program incompatible, there is no big difference in thinking, and there are not many grammatical changes. Whichever one you choose to start with will have no big impact.

If you still can't decide, please choose Python3.

How to choose an editor?

I recommend the pycharm community version, which is simple to configure, powerful, saves time and worry to use, and is friendly to beginners. And it’s completely free!

Other editors you can try:

idle: Python comes with its own editor. If you just want to write a few lines of code as quickly as possible, this is the easiest way.

vs code: Visual Studio Code - Code Editing. Redefined

atom: A hackable text editor for the 21st Century

SublimeText: Sublime Text - Download

notepad: Notepad Home

In order to allow beginners to focus more on writing code, we do not recommend vim and Emacs.

operating system?

Python supports all existing mainstream operating platforms, whether it is windows, mac or linux, they can all run Python well. And the latter two both come with a Python environment by default.

1.2 Introductory Tutorial

"Crossin's Programming Classroom-Introduction to Python"

Crossin's Programming Classroom-Introduction to Python

I think it is the most basic An easy-to-understand introductory tutorial, very suitable for people without any programming foundation to get started.

74 graphic tutorials, from the simplest Python installation to basic syntax, data structures, functions, file operations, network requests, object-oriented, etc., and gradually go into depth.

The best way to deepen your impression of a knowledge point is to write the code yourself to implement it. If you still don’t understand, try it again. So no matter which tutorial you use, please enter all the sample codes on your computer and run it, learning by doing!

Supporting exercises

Crossin's programming classroom-basic exercises

Crossin's programming classroom-online exercises

Extracurricular exercises

《Stupid Learn Python the Hard Way"

Preface - [Learn Python the Hard Way] - Read

This is a very famous Python book, but it is not suitable for self-study with zero basic knowledge. Because it emphasizes practice but does not explain it, novices can easily get confused. It is more suitable as an aid while studying.

Other recommended tutorials

"The Programming Journey of Father and Son" also known as "Learning Programming with Children"

This is also a very suitable introduction to Python with zero foundation. books. Students who like to read paper books can buy one, which is available in many online bookstores.

"Concise Python Tutorial"

Read online: Concise Python Tutorial

This is a concise and comprehensive Python introductory tutorial, simple and straightforward, no nonsense. It is suitable for people who have experience in other languages ​​​​to quickly understand Python syntax.

The above are the learning materials we recommend, mainly focusing on pure novices who do not have much programming foundation. There are also some good resources for learners with different needs:

Online text tutorial:

Liao Xuefeng’s Python tutorial

Python tutorial

Mr. Liao's tutorials cover all aspects of Python knowledge. The content is more systematic and in-depth. After you have a certain foundation, you will gain more from learning.

Head First Python

Dive Into Python

Python core programming

In-depth understanding of Python

Python standard library

Python Programming Guide

codecademy and codeschool, two websites for learning Python through the Internet, are both highly praised. Might as well go and experience it.

2. Promotion stage

After completing the basic learning at the introductory stage, you will often fall into a bottleneck period. It is difficult to further improve your programming level by watching tutorials. At this time, what is needed is practice, a lot of practice.

You can start from the routines in the book, then write small program fragments, and then write the complete project.

We have collected some practice questions and websites. You can choose appropriate exercises to do according to your own stage. It is suggested that it is best to pick one or two series to focus on, rather than just dabbling in them here and there.

Crossin's Programming Classroom - Weekly Pitfall:

The official account of the Programming Classroom will release a question for practice every week and explain it in the next week. Welcome to follow the WeChat public account and submit answers together with everyone.

3. What should I do if I encounter a problem?

Various problems will arise more or less during the learning process. Don’t try to escape. Real warriors dare to face the disastrous bugs head-on.

The first step is definitely to make good use of search engines. How to use them is also a technical job:

How to use search engines for beginners in programming

The second step is to ask for help from various sources. Gay dating website (dense fog):

4. Advice from people who have experienced it

When you first learn programming, you will have all kinds of doubts. You will encounter various pitfalls. At this time, the experience of predecessors is particularly important. We have compiled some Zhihu questions for reference:

5. Write at the end

After the first and second steps Step by step training, I believe that ordinary small programs will not be difficult for you. You have already taken a key step in the world of programming. Next, you can challenge specific projects. The rich world of crawlers, web development, data analysis, machine learning, etc. is already open to you. Choose a direction and start again!

Remember: There are no shortcuts on the road to programming.

The above is the detailed content of How to learn python programming. 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