PYTHONIA

Free Python course · in English

Learn Python for free — from your first line to real projects

PYTHONIA is an interactive Python course for complete beginners and improving coders. 400 lessons, real Python running right in your browser, instant task checking and a tutor that explains every error. Nothing to install, nothing to pay.

Why learn Python with PYTHONIA

Python right in your browser

Write and run real Python 3. Nothing to install — any browser on a computer, tablet or phone will do. Even input() works.

Learn by doing

Every lesson has a task that is checked automatically and a short quiz. Each explanation is followed by a practice lesson.

A tutor that explains errors

When your program crashes, the tutor explains what happened and where to look. Hints come in three levels.

Daily streaks and reminders

Every day with a lesson grows your streak. If you like, we remind you in the evening so you don’t lose it.

Friends and leaderboard

Add friends, race each other in XP and try to make it into the top three players.

Avatar, levels and badges

Earn XP to level up, unlock outfits and accessories for your avatar and collect badges.

Who the course is for

Complete beginners

We start from zero with your first print() and explain every new idea with examples.

Students and self-learners

Learn at your own pace, anytime and anywhere. Your progress is saved, so you can continue on another device.

Improving coders

Functions, files, objects, tests, algorithms, asyncio and ten complete projects.

Python course syllabus

20 modules from the very basics to professional Python. Each module has 10 lessons with explanations and 10 practice lessons — 400 lessons and about 76 hours of learning in total.

  1. 1. First steps

    Basics

    Printing, variables, types, user input and your first errors.

    Lesson list (10 lessons + 10 practice)
    1. Welcome to Python — your first program
    2. print() properly: several values, sep and end
    3. Comments and readable code
    4. Variables — named boxes
    5. Data types: text, numbers, true and false
    6. Input from the user: input()
    7. Type conversion: int(), float(), str()
    8. F-strings: building text without the pain
    9. When it crashes: how to read error messages
    10. Mini project: a personal business card
  2. 2. Text and strings

    Basics

    Working with text: methods, indexes, slices, f-strings, formatting.

    Lesson list (10 lessons + 10 practice)
    1. Strings up close: quotes, length, joining
    2. Indexing and slices
    3. String methods: letter case and searching
    4. Cleaning and replacing text
    5. Splitting and joining: split and join
    6. Checking methods: does it start, does it end, is it a number?
    7. Alignment and formatting into columns
    8. Special characters and multi-line text
    9. Strings are immutable
    10. Mini project: a text analyser
  3. 3. Numbers and maths

    Basics

    Integers and decimals, operators, rounding, randomness.

    Lesson list (10 lessons + 10 practice)
    1. Whole and decimal numbers
    2. Arithmetic operators
    3. Whole-number division and the remainder in practice
    4. Powers, roots and the priority of operators
    5. Rounding
    6. The math module
    7. Randomness: the random module
    8. Number bases
    9. Percentages and practical calculations
    10. Mini project: a finance calculator
  4. 4. Making decisions

    Basics

    if/elif/else conditions, comparisons, logical operators.

    Lesson list (10 lessons + 10 practice)
    1. Your first decision: if
    2. else and elif
    3. Comparing and its traps
    4. Logical operators: and, or, not
    5. Truthiness of values, and None
    6. Chained comparisons and ranges
    7. The conditional expression (the ternary operator)
    8. Nested conditions and how to simplify them
    9. Defending against a bad input
    10. Mini project: a text adventure
  5. 5. Loops

    Basics

    for, while, range, break, continue and nested loops.

    Lesson list (10 lessons + 10 practice)
    1. The for loop: repeat for every item
    2. range() in depth
    3. The while loop: as long as the condition holds
    4. break and continue
    5. Accumulators: sum, count, minimum and maximum
    6. Nested loops
    7. Iterating with an index: enumerate
    8. The main loop of a program
    9. Common mistakes in loops
    10. Mini project: guess the number
  6. 6. Lists

    Basics

    Storing many values at once, list methods, sorting and slices.

    Lesson list (10 lessons + 10 practice)
    1. A list: several values under one name
    2. Slices of lists
    3. Adding and removing items
    4. Sorting and searching
    5. Going through and filtering lists
    6. A list inside a list (2D data)
    7. Copies and references
    8. The built-in functions over lists
    9. A stack and a queue
    10. Mini project: a task manager
  7. 7. Dicts, tuples and sets

    Intermediate

    Key and value, immutable pairs, unique items.

    Lesson list (10 lessons + 10 practice)
    1. A dictionary: a key and a value
    2. Changing a dictionary
    3. Going through a dictionary
    4. A dictionary as a counter
    5. Nested data structures
    6. A tuple
    7. Unpacking values
    8. Sets
    9. Set operations
    10. Mini project: an address book
  8. 8. Functions

    Intermediate

    Your own functions, parameters, return values, scope.

    Lesson list (10 lessons + 10 practice)
    1. Your first function: def
    2. Parameters and arguments
    3. return: functions that give something back
    4. Default values of parameters
    5. Named arguments
    6. *args and **kwargs
    7. The scope of variables
    8. A function as a value
    9. Recursion
    10. Mini project: a library of text functions
  9. 9. Errors and debugging

    Intermediate

    try/except, custom exceptions, guarding against bad input.

    Lesson list (10 lessons + 10 practice)
    1. The anatomy of an error
    2. try/except: catching errors
    3. Several except blocks
    4. else and finally
    5. raise: raising an error of your own
    6. Exception types of your own
    7. assert and defensive programming
    8. Debugging a program
    9. Logging: records instead of prints
    10. Mini project: a bulletproof calculator
  10. 10. Files and data

    Intermediate

    Reading and writing files, CSV, JSON, paths and encoding.

    Lesson list (10 lessons + 10 practice)
    1. Reading a file
    2. Writing to a file
    3. with: a file that closes itself
    4. Processing lines and cleaning data
    5. CSV: tabular data
    6. JSON: structured data
    7. pathlib: paths to files
    8. Encodings and character sets
    9. Walking through directories
    10. Mini project: a diary of expenses
  11. 11. Shortcuts and functional style

    Advanced

    Comprehensions, lambda, map/filter, sorted with a key.

    Lesson list (10 lessons + 10 practice)
    1. A list comprehension
    2. A comprehension with a condition
    3. A dict and a set comprehension
    4. Nested comprehensions
    5. lambda: a function on one line
    6. map and filter
    7. Advanced sorting
    8. Generator expressions
    9. When not to use a shortcut
    10. Mini project: analysing logs
  12. 12. Standard library

    Advanced

    math, random, datetime, collections, itertools, re and more.

    Lesson list (10 lessons + 10 practice)
    1. Import and modules
    2. statistics: averages and the variance
    3. datetime: the date and the time
    4. timedelta: calculating with time
    5. collections: Counter and defaultdict
    6. deque and namedtuple
    7. itertools
    8. Regular expressions: the basics
    9. Regular expressions: groups and replacing
    10. Mini project: an extractor of data from a text
  13. 13. Objects and classes

    Advanced

    Your own data types, attributes, methods, __init__ and __str__.

    Lesson list (10 lessons + 10 practice)
    1. Why objects
    2. The constructor and self
    3. Methods and the state of an object
    4. __str__ and __repr__
    5. The attributes of a class vs of an instance
    6. Encapsulation and property
    7. Class methods and static methods
    8. Comparing and the operators
    9. Objects in collections
    10. Mini project: a banking system
  14. 14. Advanced OOP

    Advanced

    Inheritance, polymorphism, property, dataclasses, composition.

    Lesson list (10 lessons + 10 practice)
    1. Inheritance
    2. super() and extending the parent
    3. Polymorphism
    4. Abstract classes
    5. Composition instead of inheritance
    6. dataclasses
    7. Enum: named constants
    8. Mixins and multiple inheritance
    9. Designing classes in practice
    10. A mini project: RPG characters
  15. 15. Iterators and generators

    Advanced

    Custom iteration, yield, decorators, context managers.

    Lesson list (10 lessons + 10 practice)
    1. How a for loop works
    2. Your own iterator
    3. Generators and yield
    4. Chaining generators
    5. Decorators: the basics
    6. Decorators with parameters
    7. functools: the ready-made tools
    8. Context managers
    9. Closures and the state of functions
    10. A mini project: processing data with a chain
  16. 16. Code quality and testing

    Pro

    Tests, type hints, docstrings, refactoring, PEP 8.

    Lesson list (10 lessons + 10 practice)
    1. PEP 8: what code is meant to look like
    2. Docstrings and documentation
    3. Type annotations
    4. Testing with unittest
    5. What and how to test
    6. Refactoring
    7. Measuring the performance
    8. The structure of a project
    9. Reading somebody else's code
    10. A mini project: a library with tests
  17. 17. Algorithms and data structures

    Pro

    Searching, sorting, recursion, complexity, queues and graphs.

    Lesson list (10 lessons + 10 practice)
    1. The complexity of algorithms
    2. Searching
    3. The simple sorting algorithms
    4. Divide and conquer
    5. A stack, a queue and a heap
    6. Trees
    7. Graphs and searching
    8. Dynamic programming
    9. The practical algorithms
    10. A mini project: a maze
  18. 18. Modern Python

    Pro

    match, walrus, enum, typing, functools, context and idioms.

    Lesson list (10 lessons + 10 practice)
    1. match/case
    2. The walrus operator :=
    3. Formatting to the maximum
    4. The stars in detail
    5. Idiomatic Python
    6. The anti-patterns and how to avoid them
    7. Your own collections
    8. Programs from the command line
    9. Advanced typing
    10. A mini project: a modern tool
  19. 19. Concurrency and performance

    Pro

    Threads, asyncio, timing, memory and optimisation.

    Lesson list (10 lessons + 10 practice)
    1. Measuring the time
    2. Profiling
    3. The choice of a data structure
    4. The memory
    5. The caching
    6. A lazy processing of the data
    7. The concurrency: the threads, the processes, the GIL
    8. The threads, the locks and the queues
    9. The async, the await and the event loop
    10. A mini project: speed the program up
  20. 20. Big projects

    Pro

    Ten complete programs from design to a finished application.

    Lesson list (10 lessons + 10 practice)
    1. The project 1: A text adventure
    2. The project 2: A manager of the finances
    3. The project 3: A quiz application
    4. The project 4: A task manager with a step back
    5. The project 5: An analyser of the logs
    6. The project 6: A banking system
    7. The project 7: A tic-tac-toe with an unbeatable AI
    8. The project 8: A library
    9. The project 9: An encrypting tool
    10. The project 10: A system of the notes

Read next

Frequently asked questions

Is PYTHONIA really free?

Yes. The whole course is free, with no ads and no subscription. You only create a free account so your progress is saved.

Do I need to install anything?

No. Python runs right in your browser, so just open the website on a computer, tablet or phone.

Do I need any coding experience?

No. The course starts from zero. If you already know some Python, you can jump straight to later modules.

How long does the course take?

A lesson takes about 10 minutes, the whole course roughly 76 hours. You learn at your own pace.

What if I get stuck on a task?

Every task has three levels of hints, the tutor explains error messages and you can always look at the sample solution.

Is the course available in Czech too?

Yes. The interface and all 400 lessons are in English and Czech, and you can switch any time.

Write your first program today

Creating an account takes a minute. Your first lesson takes five.

Start for free