🚀 New batches open: Advanced Excel • Power BI • SQL • AI for Analytics — Book a free demo

Free Python Tutorial — learn Python in 12 days

Topic by topic, day by day, with every example runnable right here in the page. No signup, no installation.

A free, hands-on Python course

Twelve short lessons that take you from your first print() to grouping and summarising a real dataset. Every example runs in your browser — edit it, break it, run it again. Nothing to install, no signup.

Start with Day 1.

Who this is for Anyone moving into a Data Analyst or MIS role. No programming background needed. If you can write an Excel formula, you can learn this.

The 12 days

Day 1 — Python print() and variables

Your first lines of Python, running right here in the page. Nothing to install.…

Day 2 — Python numbers and arithmetic

Python is a very good calculator. Today you learn every operator you will need for data work…

Day 3 — Python strings and f-strings

Most real data arrives as messy text. Today you learn to cut it, clean it and format it.…

Day 4 — Python lists explained

A list is Python holding many values under one name. It is the closest thing to an Excel col…

Day 5 — Python dictionaries, tuples and sets

A list remembers order. A dictionary remembers labels — and that is what most real data need…

Day 6 — Python if, elif and else

Decisions. This is where a script stops being a calculator and starts being a program.…

Day 7 — Python for loops and range()

The whole point of programming: do the same thing to a thousand rows without writing it a th…

Day 8 — Python while loops, break and continue

A for loop runs a known number of times. A while loop runs until something becomes true — wh…

Day 9 — Python functions with def

A function is a named piece of work you can reuse. The moment you copy and paste code, you w…

Day 10 — Python list comprehensions

One line that replaces four. Once this clicks, your Python starts looking like a professiona…

Day 11 — Python for data analysis basics

Everything so far, applied to a realistic dataset. This is what the first month of an analys…

Day 12 — Python practice questions with answers

No new syntax. Twelve problems of the kind that come up in interviews and in your first week…

What the playground can and cannot do

The Python engine on this site is written from scratch to teach the core language. It handles variables, all the arithmetic, strings and f-strings, lists, tuples, dictionaries, sets, if/elif/else, for and while loops, functions and list comprehensions.

It deliberately does not support import — so pandas, NumPy and matplotlib will not run here. Those need a real Python installation, and they are where the Data Analytics course picks up.

It will tell you when it cannot do something Rather than guessing and giving you a wrong answer. A tutorial that quietly lies is worse than no tutorial.

How to get the most out of it

  1. Type the code, do not copy it. The typing is where the learning happens.
  2. Break things deliberately. Remove a colon, misspell a variable. Reading error messages is half the job.
  3. Do the exercises at the end of each day before moving on.
  4. One day at a time. Twelve short sittings beat one long one.

Ready for pandas and real projects?

This tutorial covers core Python. Our Data Analytics course takes you into pandas, NumPy, real files and visualisation, with mentor support and portfolio projects.

See the course →