How to learn Python in the least time?

How to learn Python in the least time?
9 min read

 

Python is an extremely versatile programming language. You can use it to create websites, machine learning algorithms, and even autonomous drones. A huge percentage of programmers around the world use Python. It gives you the power to create almost anything. But first you have to learn it. Learning any programming language can be daunting. So how do you learn Python?

One of the things that frustrated me the most when learning Python was how generic all the learning resources were. I wanted to learn how to build websites in Python, but it seemed like every learning resource wanted me to spend two long, boring months on Python syntax before I could even think of doing what I was interested in doing.

Most tutorials assume you need to learn all the Python syntax before you can start doing anything interesting. That's what leads to months spent on syntax, when what you really want to do is analyze data, build a website, or create an autonomous drone. This is what causes your motivation to fade and you just cancel everything.

After several tries, I found a process that worked better for me. What worked well was combining learning the basics with building interesting things. I spent as little time as possible learning the basics, then immediately dove into creating things that interested me. In this article, I'll walk you through how to learn Python step by step, whatever your reason for wanting to learn Python.

Determine what motivates you

Before you jump into learning Python, it's worth asking yourself why you want to learn it. This is because the journey is going to be long and sometimes painful. Without enough motivation, you probably won't succeed. For example, I slept during programming classes in engineering school when I had to memorize syntax and I was not motivated. On the other hand, when I needed to use Python to build a website, I stayed up all night to finish it.

Determining what motivates you will help you determine an end goal and a path that will get you there without boredom. You don't have to find a specific project, just a general area that interests you.

Choose an area that interests you, such as:

  • Data Science / Machine Learning
  • Mobile app
  • Websites
  • Games
  • Hardware / Sensors / Robots
  • Scripts to automate your work

Yes, you can create websites using Python!

Determine one or two areas that interest you and that you are willing to spend time on. You will direct your learning towards them and eventually build projects.

Learn basic syntax

Unfortunately, this step cannot be skipped. You should learn the basics of Python syntax before diving deeper into your desired area. You want to spend as little time as possible on this, because it's not very motivating. Personally, I did about 30% of it in the Python tutorials, which was good enough.

Here are some good resources to help you learn the basics:

  • Codeacademy – does a good job of teaching basic syntax and builds on itself well.
  • Learn Python the Hard Way – a book that teaches Python concepts from the basics to more in-depth programs.

Python language syntax

I can't stress enough that you should only spend as much time as possible on the basic syntax. The faster you can work on projects, the faster you will learn. You can always refer to the syntax when you get stuck later. You should ideally only spend a few weeks on this phase, and certainly no longer than a month.

Make structured projects

Once you have learned the basic syntax, it is possible to create your own projects. Projects are a great way to learn because they allow you to apply your knowledge. If you don't apply your knowledge, it will be difficult for you to retain it. Projects will build your abilities, help you learn new things, and help you build a portfolio to show off to potential employers.

However, very free projects at this stage will be painful - you will often be stuck and have to refer to the documentation. For this reason, it's usually best to create more structured projects until you feel comfortable doing them entirely on your own. Many learning resources offer structured projects. These projects allow you to build cool things in areas that interest you while keeping you from getting stuck.

 

Work alone on projects

Once you've completed some structured projects, it's time to work on your own projects. You will continue to consult resources and learning concepts, but you will work on what you want to work on. Before embarking on your own projects, you should feel comfortable correcting errors and problems with your programs. Here are some resources you should know:

  • StackOverflow – a community question and answer site where people discuss programming issues. You can find Python-specific questions here.
  • Google – the most common tool used by all experienced programmers. Very useful to try to solve errors
  • Python documentation – a good place to find Python reference material.

Once you have a good grasp of debugging issues, you can start working on your own projects. You should work on things that interest you. For example, I worked on tools to automatically trade stocks very quickly after learning programming.

Tips for finding interesting projects

  • Extend the projects you were working on previously and add more functionality.
  • Go to Python meetups in your area and find people who are working on interesting projects.
  • Find open source packages to contribute to.
  • See if any local nonprofits are looking for volunteer developers.
  • Find projects other people have done and see if you can expand or adapt them. Github is a good place to find them.
  • Browse other people's blog posts for interesting project ideas.
  • Think of tools that would make your daily life easier and build them.

Remember to start very small. Start with very simple things to gain confidence. It's better to start a small project that you finish than a huge project that will never get done. 

It's also helpful to find other people to work with for extra motivation.

If you really can't think of any good project ideas, here are a few:

Data Science / Machine Learning

  • A map to visualize the election results by region.
  • An algorithm that predicts the weather.
  • A tool that predicts the stock market.
  • An algorithm that automatically summarizes news articles.

Mobile app

  • An application to track the distance traveled each day.
  • An app that sends you weather notifications.
  • Real-time location-based chat.

Websites

  • A site that helps you plan your weekly meals.
  • A site that allows users to review video games.
  • A note-taking platform.

Games

  • A location-based mobile game, where you capture territory.
  • A game where you program to solve puzzles.

An example of a game you can make with Pygame.

Sensors / Robots

  • Sensors that monitor your home temperature and allow you to monitor your home remotely.
  • A smarter alarm clock.
  • An autonomous robot that detects obstacles.

Scripts to automate your work

  • A script to automate data entry.
  • A tool for extracting data from the web.

The key is to pick an idea and do it. If you're in too much of a rush to choose the perfect project, you may never complete one.

  1. Keep working on more challenging projects

Keep increasing the difficulty and scope of your projects. If you're completely comfortable with what you're building, it means it's time to try something stronger.

Here are some ideas for that time:

  • Try teaching a novice how to build a project you've done.
  • Can you increase the performance of your tool? Can it work with more data or can it handle more traffic?
  • Is it possible to make your tool useful for more people?
  • How would you market what you made?

Go forward

Ultimately, Python is evolving all the time. Only a few people can legitimately claim to fully understand this language.

You will have to constantly learn and work on projects. If you do this correctly, you'll find yourself looking at your code from 6 months ago and thinking how terrible it is. If you get to this point, you're on the right track. Working only on topics that interest you means you'll never be bored.

Python is a really fun and rewarding language, and I think anyone can achieve a high level of proficiency in this language.

I hope this article helped you know how to learn Python. 

In case you have found a mistake in the text, please send a message to the author by selecting the mistake and pressing Ctrl-Enter.
Comments (0)

    No comments yet

You must be logged in to comment.

Sign In / Sign Up