How long does it take to learn Python?

Posted by Marta on January 27, 2021 Viewed 1639 times

Card image cap

In this article I will talk about how long does it take to learn python as a first programming language. I will provide you with the steps you should follow, in other words, the things you need to learn and roughly how much time you need to spend on each.

Actually learning a programming language doesn’t take long. As a beginner, the toughest obstacle is shifting to think in an algorithmic way. This means being able to decompose a task, or action is smaller steps.

For example, let’s say you want to walk. It sounds like a simple task, but what if you have to explain how to walk to a robot. You need to think carefully about every single thing you do. To take a step, firstly you need to shift your weight to the left, then lift your right leg. Move your right leg forward, etc

Once you have gathered all steps, you need to express this smaller steps in terms that the robot understands. That’s what programming is all about.

Another obstacle is that you don’t know what exactly you need to learn. Therefore you end up wasting a lot of time googling stuff, trying to figure out what’s important and what’s not important.

This is a bit like trying to cross a forest, if you know the path to cross, you just need to follow it, easy!! however if there is no path, as soon as there is a diversion you may get lost, start walking in circles and waste time. That’s why I think having a roadmap is so important

How fast can you learn python?

You could learn python well enough to get a job in 4 months, if you are committed and work on it at least 5 days per week. Does it sound like too long? I could tell you, it’s gonna take you one month, however that’s not realistic at all. Plus I don’t think it’s achievable since some of the concepts you need to learn have to be assimilated, and that just takes some time.

Keep in mind, this timeline are referring to a normal person, just like myself, with average intelligence and other stuff and responsibilities beside learning programming. I am sure there are people out there, with exceptional abilities that can achieve this goal much quicker.

How to break down these 4 months?

Here are the things you need to learn during these 4 months

Basics

The basics means you need to install python, learn what variables are, if statements also known as conditionals, loops and functions. Simple stuff, however this is the base for anything else you learn. It’s important that you understand these concepts and how to use them well, before moving on to more advanced stuff.

My advice is Covering the basics and doing at least 20 code challenges to make sure your understanding is solid. This should take you about 2 weeks. Assuming you apply yourself for 5 days a week, at least one hour per day.

I would advice you to avoid trying to squeeze the 5 hours in one single day. Why? There are concepts that need to be assimilated. Therefore I don’t think doing all the work in 1-2 days and not working for the next 5 days will work. The consistency is key for this plan to work.

Also, it is important you choose code challenges that match your skill level, to avoid being discouraged. If you start working on a challenge and find yourself not being able to solve it, don’t get stuck.

Probably you are not ready for that problem, just yet. Move on to something easier and don’t get discouraged. It’s like trying to run a marathon after your first day at the gym, not the right time! 🙂 Give yourself time to develop you skills, and be fair and reasonable with yourself.

Basics Total working days: 14 days spread across 3 weeks

Data Structures, Object Oriented Programming and Algorithms

Once you covered the basics, next thing to learn is Data Structures, Object Oriented Programming and Algorithms. The first two are quite important. The third one not as important. Algorithms means knowing the sorting and searching algorithms, and the graph algorithms, which are BFS and DFS. I don’t mean that algorithms are not important, they are. However you could pass a junior interview without knowing much about algorithms.

Why are Data Structures and Object Oriented Programming (oops) so important? They will help you to handle larger amount of data more efficiently, in other words, faster.

Object Oriented Programming is really important. Its main benefits is that it helps you to organise your code in a logical way, so your code easier to maintain. In other words, when you look at your code one month after you wrote it, you still understand it! That is because the code is well and logically organised.

I have seen beginners trying to write intermediate level problem without data structures or oops and it is just become really complex. The code becomes a real unmanageable monster really, really quickly.

I think you can learn these three things in about 15 days, a bit more than 2 weeks. Here is how I will break down these 15 days.

  • Basic Data Structures(in python): list, tuple, dictionary, sets – 3 days including doing coding challenge
  • Stack and Queues, Trees and Graphs : 4 days including exercises.
  • OOP : Creating Classes and objects : 2 days, half of the session for theory and then start with the exercises
  • OOP : Inheritance, Composition, Encapsulation, Polymorphism – 3 days. Cover the theory in half session and then do exercises for 2 days.
  • Algorithm: Sort and Search algorithm and graph algorithm: I will dedicate 3 days to this. Learning the algorithms and then try to implement some of them

Data structures, OOP and algorithms Total working days: 15 days spread across 3-4 weeks

Control Version and Small Project

If you get to this point you have made really amazing progress, and you should be quite proud. Next thing I will advice you to learn is
some control version mechanism like Git.

Control Version means that you upload your code to a website or platform, to save your code and also to keep history of the changes you made in your code. Why is this important? Most companies use version control to save
the code of their systems and keep track of the changes made
. Also it allows teams to work on the same application. Any company will expect you to know this. My advice is using GitHub because is free and it is used by many companies all over the world.

I would say learning GitHub may take, 2 or 3 days, you don’t need to know everything, just the basic stuff. Create a repository, upload your code to the repository. Make a change to the code and upload it to the repository.

Once you covered GitHub, it is time to pick a small project to work on. Just something small you can finish in a one week. Personally I will
create a game using pygame. You can create a tetris, a memory card game, or any other game you like. I think creating a small project is important because it gives you a chance to apply all that you learnt in something real and get motivated to continue.

Control Version and Small Project Total working days = 10 days spread across 2 weeks

At this point you have been learning programming for about 38 days, which will spread across 8 weeks. Probably you get stuck at some point, so give yourself 2 extra weeks. If you have been consistent, working 5 days a week you should have a solid understanding about programming, so what’s next?

Web Development

Most developers in one way or another have to deal with web component. Certainly if you are a web developer, but even if you work on a desktop application. A desktop application is likely to fetch data from another system over the internet. Therefore understanding the web basics is quite important as a developer.

What do I mean by web basics? Understanding what HTML and CSS and what is a web server. I will dedicate 5 days to this and create a few html file with different structures. There are a few free resources like codeacademy.com. You don’t need to get into much details and create beautiful sites. Just the basics is enough.

One you understand how to create the structure of a website, you can learn a python web framework like flask or django. I will advice flask to start. Why? It is more beginner friendly, however eventually you want to learn django, just because it is in higher demand.

With flask you can start a web server, that will serve your html and css file. I will spent 7 days learning flask and building a simple website, without database. Just using some in memory data structure, to keep things simple. Keep in mind, many of the concepts you learn while creating this website, will be useful in case you want to learn django later.

Web Development Total working days = 19 days spread across 4 weeks

Databases

And last but not least you will need to learn databases. A program will used a database to save data and persist the data after shutting down the program, or server.

Any application will need a database to save and retrieve data. Therefore as a developer you need to know how to create tables in a database, retrieve, update, create and delete data in a database. And how to access a database from an application.

There are relational and non-relational. I will pick relational databases just because that will be enough to get a job.

What exactly you need to know about databases? SQL, which is the language to access relational databases, like MySQL or posgress(both are free). Once you learn SQL you need to learn how to use a python library to access a database, for instance sqlite3.

How long should you spend on databases? I will say 3-4 days for learning SQL and Sqlite and I will spend a few more days, maybe 4 days, for integrating the website you created with a brand new database.

Databases Total Working Days = 8 days spread across 2 weeks

Adding all the weeks up this plan will take about 14 weeks, 3 months and 2 weeks. At some point you may get stuck, therefore probably good adding 3 extra weeks to deal with anything unexpected. That give you a total of 4 months and 1 week.

And that’s all! After following these steps you will have a good understanding of how to create a full application using python.

What’s next?

Learn the basic data structures in python

Get started with Object Oriented Programming

Four Beginner Projects – Learn by doing!

Project-Based Programming Introduction

Steady pace book with lots of worked examples. Starting with the basics, and moving to projects, data visualisation, and web applications

100% Recommended book for Java Beginners

Unique lay-out and teaching programming style helping new concepts stick in your memory

90 Specific Ways to Write Better Python

Great guide for those who want to improve their skills when writing python code. Easy to understand. Many practical examples

Grow Your Java skills as a developer

Perfect Boook for anyone who has an alright knowledge of Java and wants to take it to the next level.

Write Code as a Professional Developer

Excellent read for anyone who already know how to program and want to learn Best Practices

Every Developer should read this

Perfect book for anyone transitioning into the mid/mid-senior developer level

Great preparation for interviews

Great book and probably the best way to practice for interview. Some really good information on how to perform an interview. Code Example in Java