Free: 4 trials of 20 minutes, no cardStart free

Craftstack Academy
Python

How long does it take to learn Python? A realistic plan for beginners

· 9 min read

Search for "how long does it take to learn Python" and you'll find answers from "a weekend" to "years". Both can be true, because they're answering different questions. Learning what print() does takes minutes. Writing your own small programs without copying takes weeks. Getting a job as a Python developer takes much longer.

This guide gives a concrete answer for the part most beginners actually mean: from your very first line to writing small, real programs of your own. It's based on how our own Python path is built, session by session, so every milestone below is something students actually build.

What "learning Python" means

It helps to split it into three levels, because each one takes a very different amount of time:

  1. The basics: variables, text and numbers, if, loops, lists and functions. You can follow and change other people's code. This is weeks, not months.
  2. Writing your own programs: you can start from a blank file, plan a small program, and get it working, including reading files and handling errors. This is where most beginners want to get to, and it's what the plan below covers: about three months at one hour a week.
  3. Using Python for a job: data analysis, web development, automation or AI, with the libraries and tools of that field, and enough experience to work on larger projects. This takes much longer, and depends heavily on the field and on how much you build. Level 2 is the foundation for all of it.

Anyone who promises a job in a few weeks is skipping level 2, and level 2 is where the real skill is.

The short answer

With one focused hour a week, plus a little practice in between:

  • After 1 hour: you've written and run your first script, and fixed your first error.
  • After about 1 month (4 hours): you write interactive scripts that ask questions, do calculations and print neat results.
  • After about 2 months (8 hours): you write programs that make decisions and repeat things: a guessing game, a gradebook, a to-do list.
  • After about 3 months (12 hours): you work with files, handle errors, write your first classes, and build a small project of your own.

Twelve hours sounds like very little, and it is, if they're the right twelve hours. They only work if you write the code yourself and practise a bit between sessions. Watching twelve hours of videos gets you nowhere near this.

The plan, week by week

Here is the order our Python path follows: three courses of four one-hour sessions each. Each session ends with something you've built yourself.

Month 1: The basics (The Workbench)

  • Week 1, your first script. You run Python, try commands one at a time, and write about_me.py, a script that prints a small text card about you. You read your first error message and fix it.
  • Week 2, variables, types and operators. You build shop.py, a small product calculator: prices in variables, arithmetic, and a check with comparison and logical operators. You learn the four core types (whole numbers, decimal numbers, text and true/false) and convert between them.
  • Week 3, strings, input and output. You build greeter.py, an interactive script that asks questions with input(), converts the answers and prints a formatted result with f-strings and string methods.
  • Week 4, practice lab and capstone. You solve practice problems without help, take the course quiz, and build your first capstone: info_card.py, a Personal Info Card program.

By the end of month 1 you can write a script that talks to the person using it. The classic error of this month is mixing text and numbers: see Python TypeError: 'int' and 'str'.

Month 2: Programs that decide and repeat (The Toolkit)

  • Week 5, conditionals. You build grader.py, which turns a score into a letter grade with if, elif and else, and you learn why indentation decides what belongs to an if (and meet IndentationError).
  • Week 6, loops. You build guess.py, a number guessing game with a loop that runs until the player wins, a counter and hints, and you use for with range().
  • Week 7, lists, dictionaries and sets. You build gradebook.py, which stores students and their scores, loops over them and prints averages, and you learn when to use a list, a tuple, a dictionary or a set.
  • Week 8, functions and capstone. You write your own functions with parameters and return values, and build the course capstone: todo.py, a To-Do List Manager.

By the end of month 2 you're writing real little programs, not just scripts that run top to bottom. This is usually the month where programming "clicks".

Month 3: Real programs (The Build)

  • Week 9, files. You move to Python on your own computer, read and write text files, and build inventory.py, which saves an inventory to a CSV file and reads it back.
  • Week 10, error handling. You build calculator.py, a calculator that never crashes on bad input, using try and except, and logs each result to a file.
  • Week 11, modules and your first classes. You import from Python's standard library, split code into two files, install a package with pip, and write your first class: a Book in library.py.
  • Week 12, final capstone. You choose a final project and build a working first version: your own class, saving and loading with a CSV file, and a menu with error handling.

After these twelve sessions you're at level 2: you can plan and build a small program of your own, and you know enough to learn whatever comes next.

Why one hour a week can be enough

It seems slow. Why not cram it into one weekend?

Because learning to program is more like learning an instrument than learning facts. A little, often, works far better than a lot at once: your brain needs time between sessions to sort out what it learned, and coming back to something after a few days, and having to remember it, is exactly what makes it stick.

A realistic week looks like this:

  • One focused session where you learn the new idea and build the project.
  • Two or three short practice sessions of 15 to 30 minutes: change the program, add a feature, or write it again from scratch without looking.

If you have more time, two sessions a week works well too, and gets you through the plan in about six weeks. More than that and you usually stop having time to practise in between, which is where much of the learning happens.

What speeds you up

  • Writing the code yourself. Typing it, running it, breaking it and fixing it. Reading or watching is not the same.
  • Reading error messages properly. Every error tells you what happened, where and often why. Learning to read them saves more time than anything else; we explain how in How to read an error message.
  • Small projects you care about. A script that renames your photos or tracks your spending teaches more than ten exercises, because you want it to work.
  • Coming back regularly. Short and often beats long and rare.
  • Getting help with hints, not answers. When you're stuck, a nudge in the right direction keeps the learning on your side. A ready-made answer takes it away.

What slows you down

  • Tutorial hopping. Starting a new course every time it gets hard means you keep repeating month 1.
  • Copying code you can't explain. Including from AI. It feels like progress, but you can't build on it. Our guide How to learn to code with AI without letting it think for you explains how to use it well.
  • Spending the first week installing tools. Start in the browser, and install Python on your computer once you know you like it. In our path, the first two courses run entirely in your browser, and you move to your own computer in month 3.
  • Long breaks. A month off often means repeating a few weeks. If you can only manage 20 minutes, do 20 minutes.

After the three months

Once you can build small programs on your own, you choose a direction, and the next steps depend on it:

  • Data: analysing spreadsheets and CSV files with libraries like pandas, and making charts. Learning SQL alongside is very useful here.
  • The web: building the back end of websites with frameworks like Flask or Django, together with HTML, CSS and JavaScript for the front.
  • Automation: scripts that rename files, fill in spreadsheets, send emails or collect data from websites.
  • AI and machine learning: this needs more maths and a solid level 2 first, but Python is the main language for it.

Each of these is a new skill on top of what you've learned, not a fresh start. Still choosing between Python and another first language? See Which programming language should you learn first?

Frequently asked questions

Can I learn Python in a weekend?

You can learn what the basic building blocks are, but not to write your own programs. That needs practice spread over weeks, with time to forget and remember in between.

Do I need to be good at maths?

No. For the plan above, the maths you already know is plenty: adding, multiplying, percentages and averages. Some later directions, like machine learning, use more maths, and you can learn that when you get there.

Am I too old to learn Python?

No. People start programming at every age, and Python is one of the friendliest languages to start with. What matters is regular practice, not age.

Do I need to install anything?

Not at first. You can write and run Python in your browser. Installing Python and a code editor like VS Code on your own computer is a good step once you're past the basics.

1 beginner error a week

One common error, what it means and how to fix it, in a short email. Free, and you can unsubscribe in any email.

Python

Why does 0.1 + 0.2 not equal 0.3 in Python?

Why Python prints 0.30000000000000004 for 0.1 + 0.2, why 0.1 + 0.2 == 0.3 is False, and the three fixes: round for display, math.isclose() instead of ==, and Decimal for money. With code you can run.

Error explained · · 4 min read

Learn by writing the code yourself.

Twenty minutes with the tutor, right in your browser. No card, nothing to install.

Start the free trial
A session: the tutor's chat on the left, the code editor with a Java program and its output on the right