Introduction

Topic 1 of 4 in Getting started6 min readBeginnerFree course

Overview

Python is one of the world’s most popular programming languages — and one of the easiest to start with. Its code reads almost like English, it doesn’t make you write a lot of ceremony before you can do something useful, and it scales from a five-line script to systems run by the world’s biggest companies.

This course assumes no programming experience. By the end you’ll write real programs: ones that make decisions, work with lists and files, organise code into functions and classes, handle errors, and are tested — finishing with a complete command-line application.

Your path through Python Basics, in four stages. Foundations: 1 Getting started, 2 Values and variables, 3 Decisions, 4 Loops. Organising: 5 Collections, 6 Functions, 7 Working with text. Real programs: 8 Errors and files, 9 Modules and packages, 10 Classes and objects. Like a pro: 11 Pythonic Python, 12 Tools and projects. Every lesson ends with an exercise, and the course finishes with a complete command-line app you build yourself.

A first look

Here is a complete Python program:

Python
name = "Asha"
hours = 365 * 24
print("Hello,", name)
print("There are", hours, "hours in a year.")
Text
Hello, Asha
There are 8760 hours in a year.

Even without knowing Python you can probably guess what it does: it stores a name, calculates a number, and prints two lines. That readability is Python’s defining feature — and it matters, because code is read far more often than it’s written.

What people build with Python

  • Automation and scripting — renaming thousands of files, filling in spreadsheets, sending reports, scraping websites. If you do something boring on a computer twice, Python can do it for you.
  • Data analysis and science — cleaning data, statistics, charts (pandas, NumPy, matplotlib). Python is the standard language of data work.
  • Artificial intelligence and machine learning — PyTorch, scikit-learn and most AI research and tools are Python-first.
  • Web applications and APIs — Django, Flask and FastAPI power sites and services such as Instagram’s backend.
  • Education and research — Python is the most common first language in universities.
  • Tools and games — command-line tools, desktop apps, simple games.

Why Python is a good first language

  • Readable syntax. Indentation shows structure, and there are few symbols to remember.
  • Batteries included. A huge standard library comes with every installation: dates, files, maths, web requests, JSON, testing and more.
  • A giant ecosystem. Over half a million packages are available from the Python Package Index (PyPI).
  • Helpful errors. Recent versions point at exactly what went wrong and often suggest the fix.
  • Interactive. You can type a line and see the result immediately, which makes experimenting easy.

Python versions

Python 3 is the language. Python 3.15, released in October 2026, is the current version, and this course is written for it. Every lesson also works on Python 3.13 and 3.14, which many computers still have; where a feature needs a newer version, the lesson says so.

(You may come across “Python 2” in old tutorials. It reached end of life in 2020 and is quite different — avoid it.)

How the course works

Each lesson has:

  • an explanation with examples you can run,
  • diagrams that show what Python is doing,
  • an exercise with starter code and a solution — try it yourself before peeking,
  • key points to review.

The most important advice in this whole course: type the code yourself and change it. Reading about programming is like reading about swimming. Break things on purpose and read the error messages — that’s how programmers actually learn.

What you need

  • A computer with Windows, macOS or Linux (a Chromebook with Linux enabled works too).
  • About 20 minutes for the next lesson, where you’ll install Python and a code editor.

Ready? Next: install Python and run your first line of code.

Exercise

Say hello, three ways

Write a program that prints three lines: a greeting, your name, and one thing you’d like to build with Python. Then add a fourth line that prints the result of a calculation — how many hours are in a year (365 days × 24 hours). Don’t worry about installing anything yet: you can try this in any online Python playground, or come back after the next lesson.

Python
# Print three lines about yourself


# Print the number of hours in a year

Summary

  • Python is a general-purpose language known for readable code; it’s used for automation, web apps, data analysis, AI and teaching.
  • Programs are lists of instructions that run from top to bottom; print() shows a value on the screen.
  • Python is free, open source and runs on Windows, macOS and Linux.
  • This course teaches the core language step by step, with an exercise in every lesson and a final project.
  • You don’t need any programming experience — just curiosity and a computer.