How to Master Python

That is the very big question.

Let us start with hello world

every programming language starts with hello world.

print("Hello World")
Hello World

How to become a Ninja in Python?

It’s simple. Pick a tutorial and complete it. Then, pick another. Rest and Repeat.

A single book or video course will not cut it. You need continual exposure to code, along with progressive overload. Patience, persistence, commitment (and a bunch of other cool qualities) are required !



I’ve come up with a basic flow of what I’d advise a beginner to do. If you’re human (last time I checked, AI wasn’t interested in learning python, yet) your version of the roadmap will vary. Just use this for reference. It’s important to know when to move to the next level. Most people do it too late. roadmap

You might prefer to pick a course on edX instead of reading a book. The overall process is more important than the individual tutorials/courses you pick.

  • Build a strong foundation by reading books.
  • Follow the tutorials that teach you to accomplish a single task with Python, like sending email or writing files. This will introduce you to the useful packages and libraries available to a Python developer.
  • Inculcate a habit of reading documentation. Build small apps by using the libraries available.
  • Gain a deeper understanding of the language and it’s tools. Learn what the experts in the field are working on.
  • Go straight to the source.

Here’s a list of useful Python resources if you’ve exhausted the ones in the diagram. Best Python Resources at Full Stack Python.

While following any tutorial, make sure you code along the way. Merely, reading the code examples isn’t enough.

Learn General Purpose Problem Solving

alt text

There’s a subtle difference between learning a language (or framework/library) and learning to program. It’s like comparing water colors to painting.

Before you pay for a ‘Full Stack Web Developer’ course, just know that it will not make you a good programmer.

It will only teach you a particular procedure to tackle a simple problem (yes, the web apps built in most of these courses are indeed simple problems).

Knowing the procedure is good, but being able to devise your own procedures is brilliant. Pay attention to programming constructs, design patterns and algorithms. These are not specific to Python and remain the same for almost all languages.

Do it long enough and the pattern will emerge.

Finding Answers

If you get stuck (you will, several times), try to solve the problem before you start running in the other direction.

There is a very high probability that someone, somewhere has faced the same problem before and the internet has documented proof of it. Search for the solution on the web. Also, the Python community (subset of the world’s population that use Python and actively participate in connecting with other Python programmers) is very welcoming.

You can always ask people for help. Join the Python channel on Gitter.

Wow Python !

There’s a lot to learn in Python. It’s used in a whole bunch of fields. Do not skip the basics and jump to specialize in a particular field.

Learning PyTorch should come after packaging, Django after Virtual Environments.

Having in-depth knowledge of Python pays off in the long run. It will result in less time spent debugging your programs while you’re working with your super special library.

cycle

How Long Does It Take ?

9 lifetimes.



It takes time to learn something well. Way longer than most people tell you. You cannot become an expert programmer in a couple of months.

Good things take time and effort.

I would recommend that you focus primarily on Python for at least a year. There will be distractions and diversions, avoid those. But don’t be scared of branching out to learn new things. Python is not the only thing you need to become a well rounded developer. Learning Git, Markdown, HTML pays off immensely. You might also need to pick up JS or statistics along the way.

Be a learner forever, but not JUST a learner !

alt text

Understand the Learn/Build cycle

There are two phases in any creative/scientific endeavor that keep repeating.

The Learn phase, where you should focus on amassing knowledge. Read books, complete every tutorial and explore what’s already been done.

The Build phase, where you create something by applying the knowledge gained in the previous phase. Stop doubting your skills, tune out the noise that says you can’t and write your own app. Only when you’re done, go back and learn again.

Balance the two phases. Have a month or two month long Learn phase followed by a month long Build phase. Most people are too scared to start the Build phase.

Become a student of the game.

Explore everything about your language, learn about the pioneers in your field, ask questions, learn why something is designed the the way it is.

There will be a time when you would be following Kenneth Reitz on GitHub, listening to Talk Python on your commutes and complying with pep8 in vernacular writing. And, you’d do it not because you need to learn, but because you want to know.