If you’ve always wanted to learn Python, but didn’t know how to get started, don’t hesitate. This article is written for you.

doubt

As data science concepts spread, Python, which is not a new language, became wildly popular.

As I have written several articles on data analysis in Python, I am often asked in the comments section by readers and students how to learn Python.

I often need to make corresponding suggestions according to their different situations. Such pertinence is strong, but efficiency is not high. Let me write this down for more people to see.

Several publishers sent me a private message encouraging me to write a Python textbook.

I have no immediate plans to write a basic Python tutorial. Because in my opinion, the existing learning resources are good enough.

Why do many people still struggle to learn Python when there are resources and paths out there?

Because learning has an efficiency problem.

Python syntax is clear and easy to learn. This is a big reason Python is so popular. However, choosing the right way to learn Python requires a combination of your own characteristics.

What are the criteria for dividing people? It’s not whether you’re a computer science major or not. It’s not whether you’re employed or not. It’s an important indicator — your self-discipline.

You may not think what I’m saying is informative. Strong self-discipline, learn better, the earth who doesn’t know?

However, those who are not self-disciplined enough are doomed to learn nothing at all?

Of course not.

Everyone’s personality has different characteristics, there is no absolute superior points. Do not believe you listen to Mr. Liu Baorui’s cross talk “Three dangers”, you will understand.

The same goes for self-discipline. As long as you are clear about who you are, you will be able to learn new knowledge and skills in a more effective way.

Let’s take a look at how people with different levels of self-discipline can learn Python more effectively.

The path I

Let’s start with the person with the least self-discipline.

Such students are often three minutes hot. I was inspired to learn Python by chance in order to pursue a career in data science.

He would immediately run to the library or bookstore and pick up a copy of Getting Started with Python in X Days. As a result, X days have not arrived, smoothly run through the whole process from entry to give up.

You must be responsible for not holding on. But the biggest problem lies in overestimating your self-discipline.

For those of you, I recommend Coursera to learn a great MOOC — “Programming for Everybody” — step by step.

I recommend this course because the quality of the courses is so good.

The first is good teaching material. The source of this textbook has a story.

First, Allen B. Downey wrote an open book, “Think Python: How to Think Like a Computer Scientist.”

The book was reviewed on Amazon like this:

Charles Severance thought it was so well written that he wanted to use it as a textbook. With the consent of the author, I wrote a “Python for Informatics” book based on the content structure of this book.

When Charles wrote the book, it was released in iBook format. It contains its own teaching videos for students to watch and learn directly.

Later, Charles expanded on the book to create a MOOC. Soon after its launch in 2015, veteran Silicon Valley engineers were scrambling to learn.

Charles is well versed in the art of course iteration. He kept adding content, improving the curriculum, developing one course into a special course (Signature Track), and upgrading the textbook to “Python for Everybody: Exploring Data In Python 3”.

Charles’ course has always been one of the best MOOC courses in the world.

This course introduces you to Python’s simple syntax in depth, and uses some basic data science tasks to help you write simple projects in Python. This solid training process can boost your confidence and stimulate interest.

For students with low levels of self-discipline, this is even more important — everything has a deadline.

Coursera’s weekly tasks are clear. If you don’t get 80% of the practice questions right, you won’t pass. If you do not complete all the exercises and course projects by the deadline, you will not receive the certificate.

The teacher is there to guide you, the TA is there to urge you, the platform reminds you of the schedule, the students on the forum are using peer pressure to push you…

Want to be lazy? Want to catch fish in three days and dry nets in two days? It is very difficult.

The path II

If your self-discipline is above average, you have a wide range of options.

Here I recommend another MOOC platform called Datacamp.

I first encountered Datacamp in early 2015. I was taking The Statistical Inference course at Duke University on Coursera, and the accompanying exercises were on Datacamp.

I was very impressed with the platform at the time because the code was running in the cloud. Learners do not need to install any environment on the native machine, a browser that supports THE HTML5 standard can bring you a complete learning experience.

It’s a great way to get started for beginners. You know, a lot of people’s enthusiasm for learning is buried in the environment configuration and software package dependent installation hole.

Two years later, Datacamp has iterated to become even stronger. Check out the Data Scientist with Python course on the front page to see the 20 courses already offered.

These courses cover everything from Python basics, to data processing, to artificial intelligence and deep neural networks.

All courses are designed to be short and concise. It usually takes no more than 4 hours to complete the study of a certain topic. This way you can learn effortlessly and get feedback (automatic grading of practice questions) and a sense of accomplishment (certification) in a fairly short time.

The course schedule of this platform is completely controlled by the learners themselves. So I summarized it as suitable for learners with certain self-discipline.

It gives you immediate feedback, keeps you abreast of where you are and keeps you from getting lost, and allows you to fully experience the joy of self-directed learning.

The first part of Datacamp’s course is usually free. After the part of purchase to unlock learning. If you are confident in your ability to learn and perseverance, you can purchase a full period (say, one year) of the course. During this period, you can take courses on all platforms and earn a certificate after passing. Such a purchase plan already has a discount, and there are certain times of the year at a significant discount, very good value. It is recommended to put them in the shopping cart.

This is my deep Learning Framework Keras certificate from Datacamp. It really only takes a few hours to learn. The sense of accomplishment is quite strong.

Path III

The aforementioned courses are expensive. Coursera’s average price per course is around $49. For groups of students from developing countries, Coursera offers financial aid. You can fill out the application form truthfully according to your own needs to receive financial aid.

For those of you with a strong sense of self-discipline, your choice can be very straightforward — use the most respected textbooks and read your own books.

There is no textbook that is most admired. As the saying goes:

One man’s meat, is another man’s poison.

There is nothing in this world that we all agree on. But there are well-received textbooks, such as the oddly titled Learn Python the Hard Way.

Don’t let the name fool you into thinking this is a bad introduction to Python.

On the contrary, the book is designed to suit the laws of human cognition.

We learn things step by step, from easy to difficult. If we are always in pursuit of new knowledge, what we have learned will soon be forgotten. Running in circles all the time can lead to boredom and boredom. You remember your senior year test?

A good textbook should provide learners with new knowledge and content in each chapter and present enough challenges. But the challenge should not be so high that learners feel frustrated and give up. At the same time can not ignore in the follow-up content of the previous knowledge to change the face of the spiraling type of repeated. Only in this way can we consolidate what we have learned, let learners feel the role of basic knowledge and enhance the pleasure of learning.

This is a little abstract, but there is actually an English textbook that is very consistent with the above cognitive laws. This is what I recommend repeatedly in class and in articles:

Learning Python the Stupid Way is another such book. All you need to do is open the book, open up a nice code editor, and start typing, running, changing code as the book tells you to do…

The following is the code I typed from this book when I was studying.

The book is by far the most complete training in Python basics.

By the way, this book is available in Chinese. So if your English is not good, don’t worry at all.

A word of caution. I really need to learn English. Not only does it broaden your horizons, it also increases the opportunities you may have. Given that the readers who read this section carefully are highly disciplined, I need say no more.

challenge

That completes the three basic paths to Python. With a clear understanding of your self-discipline, you can find a way to gradually learn and master Python.

But after reading and attending classes, is that enough?

Of course not.

Many people have made mistakes here. They think that if they get a certificate, or a textbook, they really know Python. Then he threw the language aside and went to watch American TV series and novels.

Trust me, you’ll forget.

If you never forget what you have long been out of touch with… Go to the hospital to have it checked.

Most people’s memory pattern looks something like this:

Without intervention, within a week you will have forgotten most of what you have learned.

What if you don’t want your hard-earned Python knowledge to go to waste so easily?

practice

You should practice.

You don’t have to work in the core technology department of a Fortune 500 company for years to practice Python skills.

You can look at all kinds of interesting problems in your life and see if you can program Python to solve them.

It was after my first Github project that I really felt like I was getting a grip on Python.

The project is very simple, using Python as the glue language to connect a series of tools together. You can change Markdown’s content into any format you want with one click.

Formats include but are not limited to:

  1. PDF/LaTeX;
  2. Word;
  3. Bitcron manuscripts;
  4. MarkEditor manuscripts;
  5. MWeb manuscripts;
  6. Bear the manuscripts;
  7. TextBundle (import MindNode, Ulysses, etc.);
  8. Pass Reveal. Js slide;
  9. Release version Markdown (picture one button to seven niu Tu bed);
  10. Local version Markdown (simple books and other remote Markdown to synchronize pictures to local);
  11. Day One Diary.

Some of these features I’m releasing in the Github Public project, here. I wrote about it accordingly.

This little project, I started in 2014. To be honest, looking back at the code at the time, it was awful. But if you’re starting to feel this way about your code, you’re making progress.

Don’t expect to write perfect code out of hand, always keep the word “iteration” in mind. So you can tolerate your clumsiness and improve. As the ancients said:

Study like the seedlings of spring, see its increase, and has a director.

In the process of doing this project, I have encountered Chinese coding, privacy information storage, file name space handling, absolute and relative path, release process division, functional decoupling, attached parameters of Web picture address… And so on.

By reviewing your logs with git version control and comparing versions, you can see exactly when and how you solved these problems. Then don’t forget to check off any new skills in your toolbox.

As you work through the small problems, you will truly feel the value of your skills and build confidence.

discuss

Have you learned Python yet? How did you learn to do that? Can you share your learning experience with us? Do you have any different opinions, or better suggestions, about the resources and paths recommended in this article? Welcome to leave a message, record your thinking, we exchange and discuss together.

If you like, please give it a thumbs up. You can also follow and top my official account “Nkwangshuyi” on wechat.

If you’re interested in data science, check out my series of tutorial index posts entitled how to Get started in Data Science Effectively. There are more interesting problems and solutions.