Skip to content
Vasanthan Career Guide
DEVProgramming

Learn Python From Scratch: A 12-Week Roadmap

A week-by-week plan to go from zero to writing useful Python programs, with practice projects so the knowledge actually sticks.

A beginner's desk with a laptop showing a Python code editor, an open notebook of handwritten notes and a mug

Key points

  • About an hour a day for 12 weeks is enough to write useful Python scripts.
  • Spend more time typing and running code than watching or reading.
  • Learn the core: variables, conditions, loops, functions, lists and dictionaries.
  • Build a small project every few weeks to connect the pieces.
  • Learn Git and virtual environments early; they make every later step easier.
On this page
  1. Why learn Python first?
  2. What you need before you start
  3. The 12-week Python roadmap at a glance
  4. Weeks 1-4: Python basics
  5. Weeks 1-2: variables, types and input
  6. Weeks 3-4: conditions, loops and functions
  7. Weeks 5-9: data structures, files, tools and libraries
  8. Weeks 5-8: the essentials
  9. Week 9: libraries and APIs
  10. Weeks 10-12: build real projects
  11. How to stay consistent
  12. Your next step
  13. Frequently asked questions

You can learn Python from scratch in about 12 weeks by practising for roughly an hour a day: two weeks on setup and basics, four weeks on core programming ideas, three weeks on files, libraries and tools, and three weeks building projects. The key is to write and run code every day rather than only watching tutorials.

This roadmap assumes no prior experience. Adjust the pace to your schedule; if a week feels hard, repeat it. Consistency matters far more than speed.

Why learn Python first?

Python reads close to plain English, so beginners can focus on ideas instead of punctuation. It is also widely used in web development, automation, data analysis, science and machine learning, which means the skills carry over to real jobs and personal projects.

Just as important, Python has a large, friendly community. Almost any error message you meet has been asked about and answered before, which makes getting unstuck much easier when you are learning alone.

What you need before you start

  • A computer that can run a code editor comfortably; see our laptop buying guide if you are shopping.
  • A recent version of Python 3 from the official Python website or your system's package manager.
  • A code editor with Python support, such as a popular free editor with a Python extension.
  • A notebook or notes file to record errors you hit and how you fixed them.
# Check that Python is installed
python3 --version

# Create and activate a virtual environment for your project
python3 -m venv .venv
source .venv/bin/activate      # macOS and Linux
.venv\Scripts\activate         # Windows

# Install a package inside it
pip install requests

The 12-week Python roadmap at a glance

A 12-week plan at about one hour a day
WeeksFocusYou can now
1-2Setup, variables, types, input and outputWrite small scripts that take input and print results
3-4Conditions, loops and functionsAutomate simple decisions and repeated steps
5-6Lists, dictionaries, sets and tuplesStore and process collections of data
7Files, errors and modulesRead and write files safely and organise code
8Git and the standard libraryTrack changes and use built-in tools
9Third-party libraries and APIsFetch data from the web and use popular packages
10-12ProjectsBuild and share complete small programs

Weeks 1-4: Python basics

Weeks 1-2: variables, types and input

Learn how to store values in variables, the difference between strings, integers, floats and booleans, and how to use print() and input(). Practise string formatting with f-strings. Write a tip calculator, a unit converter and a short quiz.

Weeks 3-4: conditions, loops and functions

Use if, elif and else to make decisions, for and while loops to repeat work, and functions to package reusable steps. Functions are the turning point for most beginners: once you write them comfortably, bigger programs stop feeling overwhelming.

def grade(score: int) -> str:
    if score >= 80:
        return "A"
    elif score >= 60:
        return "B"
    return "Keep practising"

for s in [92, 71, 45]:
    print(s, grade(s))

Weeks 5-9: data structures, files, tools and libraries

This stretch turns small scripts into programs that handle real data. Expect it to feel slower than the first month; that is normal, because you are now combining several ideas at once.

Weeks 5-8: the essentials

  • Lists for ordered items, dictionaries for key-value lookups, sets for unique values and tuples for fixed groups.
  • List comprehensions to transform data in one readable line.
  • Files: open, read and write text and CSV files using with blocks.
  • Errors: read tracebacks carefully and handle expected problems with try and except.
  • Modules: split code into files and import what you need.
  • Git: commit your progress so you can experiment without fear. Our Git for beginners guide covers the commands you need.

Week 9: libraries and APIs

Python's ecosystem is its superpower. Learn to install packages with pip inside a virtual environment, call a public web API and parse the JSON it returns. Pick one popular library in an area you care about, such as data analysis, web development or automation, and work through its official tutorial.

Get into the habit of reading official documentation rather than relying only on videos. Documentation feels dense at first, but it is always up to date, and learning to scan it for the one example you need is a skill every working developer uses daily.

Weeks 10-12: build real projects

Projects connect everything you have learned and give you something to show. Choose two or three small ones that solve a real problem for you.

  1. Expense tracker: read transactions from a CSV file and summarise spending by category. It pairs well with our guide to making a budget.
  2. File organiser: sort a messy downloads folder into subfolders by file type.
  3. Weather or news checker: call a public API and print a daily summary.
  4. Command-line to-do app: add, list and complete tasks saved to a file.

How to stay consistent

  • Code at the same time each day, even if only for 20 minutes.
  • Keep a running list of small project ideas from your own life.
  • When stuck for more than 20 to 30 minutes, take a break or ask for help with a specific question.
  • Review old code each week; spotting improvements shows how far you have come.

Your next step

Install Python today, create a folder for this roadmap, and write a script that asks for your name and prints a greeting. Then commit it with Git. That is week one, day one, done.

Frequently asked questions

Can I learn Python in 3 months?

Yes, you can learn enough to write useful scripts and small projects in about three months with regular practice. Becoming job-ready usually takes longer and depends on the role.

Do I need to be good at maths to learn Python?

No. Basic arithmetic is enough for most beginner programming. More maths helps later for areas like data science or machine learning.

Should I learn Python 2 or Python 3?

Learn Python 3. Python 2 reached end of life years ago and is no longer supported.

What should I learn after Python basics?

Choose a direction, such as web development, data analysis or automation, and learn the main library for it. Keep building projects as you go.

Share this guide

Written by

Founder and CEO of VarSys

Vasanthan writes practical career guides about job searching, workplace skills and technology used at work.

Get the best of Programming, weekly

New guides and the updates worth knowing about. No spam, unsubscribe in one click.