Python Course
Python is one of the world's most popular programming languages — readable, versatile, and used for everything from automation scripts to web back ends, data analysis and AI. This course takes you from your first line of code to writing clean, tested, real-world programs, with runnable examples on every page.
What you'll learn
The course has 56 lessons in eight parts:
- Getting Started — installing Python, syntax and indentation, variables, data types, numbers, strings, formatting, booleans, operators, input and output.
- Control Flow —
if/elif/else,match,whileandforloops,break,continueand loopelse. - Data Structures — lists, comprehensions, tuples, sets, dictionaries, slicing, unpacking and the
collectionsmodule. - Functions — arguments, scope, lambdas, recursion, type hints, decorators, iterators and generators.
- Object-Oriented Python — classes, inheritance, special methods, properties, dataclasses and enums.
- Errors & Files — handling and raising exceptions, reading and writing files, paths, JSON and CSV.
- Modules & the Standard Library — imports and packages, pip and virtual environments, maths, dates, regular expressions, itertools and asyncio.
- Writing Good Python — testing, Pythonic style, recent Python versions and a final project.
Every example shows its real output, and every runnable example has been checked by executing it with Python 3.14. The Try it yourself editors run genuine Python in your browser — press Run or Ctrl+Enter. The first run downloads the interpreter, which takes a few seconds.
No previous programming experience is needed.
Practice
- Playground — a blank editor for your own experiments.
- Exercises — fill-in-the-blank tasks and coding problems with solutions.
- Quiz — test your understanding across the whole course.
- Syllabus & Study Plan — learning outcomes and a week-by-week schedule.
Lessons
Getting Started
- Introduction to Python
- Installing & Running Python
- Syntax, Indentation & Comments
- Variables
- Data Types
- Numbers
- Type Conversion
- Strings
- String Methods
- String Formatting with f-strings
- Booleans, Truthiness & None
- Operators
- Input & Output
Control Flow
Data Structures
- Lists
- List Methods
- List Comprehensions
- Tuples
- Sets
- Dictionaries
- Dictionary Methods & Comprehensions
- Slicing & Unpacking
- The collections Module
Functions
- Functions
- Arguments in Depth
- Scope
- Lambdas & Higher-Order Functions
- Recursion
- Type Hints
- Decorators
- Iterators & Generators
Object-Oriented Python
- Classes & Objects
- Inheritance
- Special Methods
- Properties, Class & Static Methods
- Dataclasses & Enums
Errors & Files
- Handling Exceptions
- Raising & Custom Exceptions
- Reading & Writing Files
- Paths & the File System
- JSON & CSV
Modules & the Standard Library
- Modules & Packages
- pip & Virtual Environments
- math, random & statistics
- Dates & Times
- Regular Expressions
- itertools & functools
- Async Programming with asyncio
Writing Good Python
Practice
Where to start: begin with Introduction and work through in order. Afterwards, continue with NumPy, pandas or Django, depending on what you want to build.