search
HomeBackend DevelopmentPython TutorialHow to learn python programming

How to learn python programming

May 29, 2019 pm 04:02 PM
python

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
Python: Automation, Scripting, and Task ManagementPython: Automation, Scripting, and Task ManagementApr 16, 2025 am 12:14 AM

Python excels in automation, scripting, and task management. 1) Automation: File backup is realized through standard libraries such as os and shutil. 2) Script writing: Use the psutil library to monitor system resources. 3) Task management: Use the schedule library to schedule tasks. Python's ease of use and rich library support makes it the preferred tool in these areas.

Python and Time: Making the Most of Your Study TimePython and Time: Making the Most of Your Study TimeApr 14, 2025 am 12:02 AM

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python: Games, GUIs, and MorePython: Games, GUIs, and MoreApr 13, 2025 am 12:14 AM

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python vs. C  : Applications and Use Cases ComparedPython vs. C : Applications and Use Cases ComparedApr 12, 2025 am 12:01 AM

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

The 2-Hour Python Plan: A Realistic ApproachThe 2-Hour Python Plan: A Realistic ApproachApr 11, 2025 am 12:04 AM

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python: Exploring Its Primary ApplicationsPython: Exploring Its Primary ApplicationsApr 10, 2025 am 09:41 AM

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

How Much Python Can You Learn in 2 Hours?How Much Python Can You Learn in 2 Hours?Apr 09, 2025 pm 04:33 PM

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics in project and problem-driven methods within 10 hours?How to teach computer novice programming basics in project and problem-driven methods within 10 hours?Apr 02, 2025 am 07:18 AM

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor