
Lesson 1, "Welcome to Python", teaches you the topic through 13 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Python is a readable, free, all-purpose language
• Installed Python and checked python3 --version
• Set up VS Code with the Python extension
• print shows text; # starts a comment
• Errors: read the last line, check quotes and case
• The REPL: python3 to start, exit() to leave
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed (shown step by step in this lecture).
Code examples in this lecture (13): hello.py, greeting.py, numbers.py, spacing.py, quotes.py, banner.py, comments.py, switch_off.py, and more.
Lesson 2, "Variables and Data Types", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• A variable is a name tag pointing at a value
• = assigns: right side first, then the name
• snake_case names; no leading digit, no spaces
• int, float, str, bool and None; check with type()
• Dynamic typing: the type belongs to the value
• a, b = b, a swaps; CONSTANTS in capitals
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lesson 1 of this course.
Code examples in this lecture (16): name_tags.py, reassign.py, two_tags.py, case_error.py, digit_name.py, keyword_name.py, numbers.py, text_and_bool.py, and more.
Lesson 3, "Numbers and Operators", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• + - * / and / always gives a float
• // floor division, % remainder, ** power
• Precedence: ( ), **, * / // %, then + -
• x += 1 updates a variable; round() tidies floats
• == != < > <= >= give True or False
• and, or, not combine booleans; import math for more
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–2 of this course.
Code examples in this lecture (16): calculator.py, pizza.py, remainders.py, powers.py, average.py, order_total.py, score.py, float_check.py, and more.
Lesson 4, "Working with Strings", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Single, double and triple quotes, plus escapes like \n
• + joins strings, * repeats them
• Indexes start at 0; -1 is the last character
• Slices [start:stop:step] stop just before stop
• Strings are immutable; methods return new strings
• f"{value:.2f}" formats values inside text
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–3 of this course.
Code examples in this lecture (16): quotes.py, apostrophe.py, escapes.py, full_name.py, banner.py, indexing.py, slicing.py, dates.py, and more.
Lesson 5, "Input, Output and Type Conversion", teaches you the topic through 15 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• input() shows a prompt and waits for the user
• input() always returns a string
• Convert with int(), float(), str() and bool()
• ValueError: the text can't be converted
• print(..., sep="-", end="") shapes output
• Challenge: add a rounding option to the receipt
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–4 of this course.
Code examples in this lecture (15): ex1_greeting.py, ex2_two_questions.py, ex3_input_type.py, ex4_add_numbers.py, ex5_next_year.py, ex6_temperature.py, ex7_int_float.py, ex8_str_join.py, and more.
Lesson 6, "Making Decisions with if, elif and else", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• if runs a block only when its condition is True
• Indentation (4 spaces) defines the block
• else and elif: the first True condition wins
• Nest decisions, or combine them with and / or
• Empty and zero values are falsy; others are truthy
• x if condition else y, and match / case
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–5 of this course.
Code examples in this lecture (16): ex1_vote.py, ex2_battery.py, ex3_even_odd.py, ex4_password.py, ex5_age_text.py, ex6_weather.py, ex7_order_bug.py, ex8_login.py, and more.
Lesson 7, "Loops: while and for", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• while repeats as long as a condition is True
• Change something inside, or Control C an infinite loop
• for walks through a sequence, one item at a time
• range(start, stop, step) stops before stop
• break exits, continue skips, else means no break
• Nested loops for grids; enumerate for positions
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–6 of this course.
Code examples in this lecture (16): countdown.py, doubling.py, password.py, vowels.py, sum_range.py, mistake.py, phone.py, first_multiple.py, and more.
Lesson 8, "Lists", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Lists hold ordered items in square brackets
• Indexes start at 0; -1 is the last item; slices skip the stop
• Lists are mutable: append, insert, extend, remove, pop, clear
• sort() changes in place; sorted() returns a new list
• in, len, min, max and sum answer quick questions
• b = a is an alias; use a.copy() for a real copy
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–7 of this course.
Code examples in this lecture (16): create_lists.py, read_index.py, slices.py, change_items.py, shopping_add.py, shopping_remove.py, sorting.py, sort_mistake.py, and more.
Lesson 9, "Tuples and Sets", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Tuples are ordered and immutable: (3, 5)
• A one item tuple needs a comma: ("red",)
• Unpack with a, b = pair; swap with a, b = b, a
• Sets hold unique items, no order, no index
• Union |, intersection &, difference -
• Fast x in set; set(list) removes duplicates
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–8 of this course.
Code examples in this lecture (16): tuple_basics.py, one_item.py, immutable.py, weekdays.py, person.py, swap.py, scores.py, star.py, and more.
Lesson 10, "Dictionaries", teaches you the topic through 15 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Dictionaries store key-value pairs; keys are unique
• d[key] reads; d.get(key, default) reads safely
• Assign to add or update; del and pop() remove
• keys(), values(), items() for looping
• Nest dictionaries and lists for real-world data
• Count with get(), group with setdefault(), or use Counter
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–9 of this course.
Code examples in this lecture (15): ex01_book.py, ex02_capitals.py, ex03_menu.py, ex04_settings.py, ex05_stock.py, ex06_cart.py, ex07_scores.py, ex08_report.py, and more.
Lesson 11, "Functions: The Basics", teaches you the topic through 13 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Functions bundle code you can reuse: don't repeat yourself
• def name(params): defines it; name(args) calls it
• return hands a value back; print only shows it
• Defaults make parameters optional
• Keyword arguments: by name, after positional ones
• Docstrings document; commas return several values
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–10 of this course.
Code examples in this lecture (13): banner.py, call_order.py, greet.py, pets.py, print_vs_return.py, area.py, grade.py, coffee.py, and more.
Lesson 12, "Functions in Depth", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• *args packs a tuple, **kwargs packs a dict
• * and ** at the call unpack a list or dict
• LEGB: Local, Enclosing, Global, Built-in
• global and nonlocal rebind outer names
• Never use [] as a default; use None
• lambda, map, filter, sorted(key=...), recursion
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–11 of this course.
Code examples in this lecture (17): add_all.py, profile.py, order.py, dates.py, names.py, greet.py, local_global.py, global_counter.py, and more.
Lesson 13, "Modules, Packages, pip and Virtual Environments", teaches you the topic through 21 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• import, from ... import and as
• math, random, datetime and os
• Your own module + if __name__ == "__main__"
• Packages: a folder with __init__.py
• pip install from PyPI inside a .venv
• Select the interpreter; pip freeze > requirements.txt
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–12 of this course.
Code examples in this lecture (21): math_basics.py, from_import.py, stats_alias.py, dice.py, dates.py, where_am_i.py, geometry.py, areas.py, and more.
Lesson 14, "Working with Files", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• open(path, mode, encoding="utf-8")
• "r" reads, "w" overwrites, "a" appends
• with closes the file automatically
• read(), readline(), for line in file
• pathlib: Path, /, exists(), iterdir(), glob()
• A notes app that remembers between runs
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–13 of this course.
Code examples in this lecture (17): write_shopping.py, write_colors.py, read_all.py, read_lines.py, loop_lines.py, scores.py, log_runs.py, diary.py, and more.
Lesson 15, "Errors and Exceptions", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Syntax errors stop everything; exceptions happen at runtime
• Read a traceback from the bottom up
• try / except catches specific exceptions
• else runs on success; finally always runs
• raise ValueError(...) and custom exception classes
• EAFP vs LBYL, and a crash-proof tip calculator
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–14 of this course.
Code examples in this lecture (17): syntax.py, typo.py, report.py, concat.py, lookups.py, convert.py, divide.py, average.py, and more.
Lesson 16, "Object-Oriented Programming: Classes and Objects", teaches you the topic through 14 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• A class is a blueprint; an object is one instance
• __init__ sets up each object; self is the object
• Attributes hold data, methods hold behaviour
• Class attributes are shared; instance ones are not
• __str__ for users, __repr__ for developers
• _name = internal; @property controls access
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–15 of this course.
Code examples in this lecture (14): dog.py, book.py, robot.py, counter.py, cat.py, cart.py, player.py, tricks.py, and more.
Lesson 17, "Inheritance, Polymorphism and Magic Methods", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Inheritance: a child class reuses its parent
• super() calls the parent's version
• Overriding + polymorphism: same call, many forms
• isinstance and issubclass check types
• Prefer has-a composition when unsure
• Magic methods and ABCs shape your classes
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–16 of this course.
Code examples in this lecture (17): ex1_inherit.py, ex2_new_methods.py, ex3_super_init.py, ex4_forgot_super.py, ex5_extend_method.py, ex6_override.py, ex7_duck_typing.py, ex8_builtins.py, and more.
Lesson 18, "Comprehensions, Iterators and Generators", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• [expr for x in data if cond] builds lists in one line
• {k: v ...} and {x ...} build dicts and sets
• for loops use iter() and next() until StopIteration
• __iter__ and __next__ make your own iterator class
• yield pauses a function; generators are lazy and use once
• itertools: count, islice, chain, accumulate, groupby
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–17 of this course.
Code examples in this lecture (16): tax_loop.py, scores.py, capped.py, menu.py, emails.py, iter_next.py, for_by_hand.py, countdown_class.py, and more.
Lesson 19, "Decorators and Context Managers", teaches you the topic through 16 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Functions are objects; closures remember outer variables
• A decorator wraps a function: @deco means f = deco(f)
• Always use *args, **kwargs and @functools.wraps
• Decorators with arguments need a factory layer
• @lru_cache gives free caching for pure functions
• with calls __enter__ and __exit__; @contextmanager uses yield
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–18 of this course.
Code examples in this lecture (16): ex01_functions_as_values.py, ex02_closure_counter.py, ex03_first_decorator.py, ex04_arguments.py, ex05_wraps.py, ex06_repeat.py, ex07_log.py, ex08_stacking.py, and more.
Lesson 20, "Type Hints and Dataclasses", teaches you the topic through 15 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Type hints label what goes in and out: name: str, -> int
• Generics and unions: list[int], dict[str, int], int | None
• Python ignores hints; mypy checks them
• @dataclass writes __init__, __repr__ and __eq__ for you
• field(default_factory=list) and frozen=True
• Enum for fixed choices, NamedTuple for small records
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–19 of this course.
Code examples in this lecture (15): greet.py, not_enforced.py, scores.py, lookup.py, to_number.py, next_age.py, grade.py, product.py, and more.
Lesson 21, "Testing and Debugging", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• assert checks an assumption; False raises AssertionError
• unittest: TestCase classes and assertEqual, built in
• pytest: test_ functions, plain assert, python3 -m pytest -v
• Fixtures share setup; parametrize runs many cases
• Debugging: read tracebacks bottom-up, print f"{x=}"
• logging: levels, basicConfig, no more stray prints
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–20 of this course.
Code examples in this lecture (17): ex1_discount.py, ex2_word_count.py, ex3_withdraw.py, shop.py, test_shop_unittest.py, test_shop.py, text_tools.py, test_text_tools.py, and more.
Lesson 22, "Working with Data: JSON, CSV, Dates and the Web", teaches you the topic through 21 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• json: dumps/loads for strings, dump/load for files
• csv: DictReader and DictWriter, values arrive as str
• datetime, timedelta, strftime out, strptime in
• urlopen + json.load to read a web API
• try/except URLError with an offline fallback
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–21 of this course.
Code examples in this lecture (21): ex1_json_text.py, ex2_json_file.py, ex3_json_quotes.py, ex4_json_types.py, sales.csv, ex5_csv_read.py, ex6_csv_totals.py, ex7_csv_write.py, and more.
Lesson 23, "Concurrency: Threads, Processes and asyncio", teaches you the topic through 17 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Concurrency = juggling waits; parallelism = many cores at once
• The GIL: one thread runs Python code at a time
• ThreadPoolExecutor for I/O-bound waiting
• ProcessPoolExecutor for CPU-bound work, with the __main__ guard
• async def + await; asyncio.gather runs coroutines together
• Measure first, and keep short tasks simple
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–22 of this course.
Code examples in this lecture (17): ex1_one_by_one.py, ex2_threads.py, ex3_forgot_join.py, ex4_pool.py, ex5_first_answer.py, ex6_gil_check.py, primes.py, ex7_cpu_threads.py, and more.
Lesson 24, "Capstone Project: A Command-Line Task Manager", teaches you the topic through 12 short, practical Python examples. First we cover the ideas with clear visual slides. Then we write every example together in VS Code, run it, and read the output line by line, including the most common mistakes and how to fix them.
Key takeaways from this lecture:
• Planned a project and split it into focused files
• Modelled tasks with a @dataclass
• Saved and loaded JSON with pathlib
• Built a CLI with argparse subcommands
• Caught errors at the edge with sys.exit
• Tested actions and views with pytest and tmp_path
Practice: the lecture ends with a hands-on challenge so you can apply everything on your own.
Requirements: Python 3 and VS Code installed; knowledge from lessons 1–23 of this course.
Code examples in this lecture (12): models.py, try_model.py, storage.py, try_storage.py, actions.py, try_add.py, try_done.py, cli.py, and more.
"This course contains the use of artificial intelligence. The narration is AI-assisted, ensuring that every lesson is clear and consistent. However, all code, examples, and exercises have been personally planned, written, and tested by me. Each example is executed live on screen, including any errors. I attach importance to you receiving high-quality and clear instruction."
Learn Python the way it actually sticks: every idea is explained clearly, then typed, run and debugged live in VS Code, one small example at a time.
Python from Zero to Advanced is a complete Python 3 course with 24 lessons, more than 14 hours of video and over 380 hands-on code examples. You start with no programming experience at all and finish by building a real command-line application with tests.
Why this course is different
• Learn by doing: each lesson starts with short visual slides, then we code every example together and read the output line by line.
• Mistakes on purpose: we break the code, read the error message together and fix it, so you learn to debug from day one.
• Small, focused examples: each example lives in its own short file, so you always see exactly what is new.
• Clear, friendly narration: a patient teacher voice explains not only what to type, but why.
• Practice every lesson: each lecture ends with a challenge to try on your own.
What you will learn
• Python basics: variables, data types, numbers, strings, input and output, conditions and loops
• Data structures: lists, tuples, sets and dictionaries
• Functions in depth: parameters, return values, *args, **kwargs, scope, lambdas and recursion
• Modules, packages, pip and virtual environments
• Working with files, JSON, CSV, dates and live web APIs
• Errors and exceptions, and how to write code that does not crash
• Object-oriented programming: classes, inheritance, properties and magic methods
• Advanced Python: comprehensions, generators, decorators, context managers, type hints and dataclasses
• Testing with pytest and unittest, debugging and logging
• Concurrency with threads, processes and asyncio
• A final capstone project: a command-line task manager that puts it all together
Who this course is for
This course is for complete beginners, students and career changers, self-taught coders who want to fill the gaps, and developers coming from other languages. All you need is a computer and the free tools we install together in the first lesson.
Enroll now and write your first Python program in the next few minutes.
This course contains the use of artificial intelligence.