Skip to main content
🐍

Python Foundations

L1Β· 174 lessons

From zero to confident with Python basics

0 / 174 Β· 0%
cert_available_label
Certificate in Python Foundations
0 / 60 cert_lessons_toward

174 interactive lessons split into 8 modules covering print/variables, types, conditions, loops, lists, dicts, functions, strings, errors, and real-world mini-projects. First 15 lessons free after a free signup.

βœ… Who this is for

  • Β·Never programmed before β€” this assumes literally zero coding background
  • Β·You don't need a Mac. Browser is enough. We provide the Python runtime
  • Β·Math: high-school arithmetic is plenty. No calculus, no proofs
  • Β·English not required β€” most lessons localised to many languages, pick yours in the header

β†’ After you finish

πŸ“– Topic overview:Learn Python free

⭐0/522 stars· 0% complete

Resume β†’

Hello, World!

Variables

FREE

Data types

FREE

Strings

FREE

Numbers and math

FREE

User input

FREE

Currency converter

FREE

if / else conditions

FREE

Find the bug in the if

FREE

Even or odd

FREE

Grade calculator

FREE

for loops

FREE

while loops

FREE

FizzBuzz

FREE

Shopping list

FREE

🎯 Review · 15-lesson recap

FREE

Contacts dict

Greeting function

Predict the output

List comprehensions

Guess the number

Predict: print with comma

Predict: math

Predict: for loop

Predict: f-string + variables

List & append β€” write code

Quiz: which type is immutable?

Quiz: what does len() return?

Division // and % β€” write code

Quiz: comments in Python

Quiz: what does a function without return return?

🎯 Review · build + look up a contact book

Double a number

Maximum of three

Reverse a string

Sum of a list

Count vowels

Predict: `in` operator on strings

Quiz: how do str and int differ?

🎯 Mini-project: Guess the number

Predict: conditions with and/or

Find the bug: loop

Fill in: nested loop

Default parameters

Predict: variable scope

Find the bug: forgotten return

Quiz: what does .lower() return?

Fill in: lambda

🎯 Review · text stats with functions

Replace a word

Split a sentence

Predict: slice [::-1]

Quiz: which method strips whitespace?

Capitalise words in a title

🎯 Mini-project: Word frequency counter

try / except β€” catch the error

Find the bug: int() on a string

Quiz: what error fires on a missing dict key?

Predict: try / finally

Safe number parsing

Find the max in a list

Filter: only evens

Count words in text

Mini calculator

FINAL: TODO-list mini-project

🎯 Review · safe CSV parser

List comprehensions

Dict comprehensions

enumerate()

zip()

*args β€” variable arguments

**kwargs β€” keyword arguments

Lambda functions

sorted() with key=

Predict: map and filter chained

F-strings: formatting deep dive

String split() and join()

String strip() and replace()

Scenario: process a CSV export at midnight

Scenario: parse a webhook payload

Fix: bare except swallows real bugs

🎯 Mini-project: Calculator with history

Scenario: validate user age at signup

Fix: a wrong type hint that mypy would catch

Predict: list slicing tricks

Counter from collections

Set operations

Classes: defining your own type

Class methods and static methods

Inheritance

super(): calling the parent

Magic methods: __str__ and __eq__

Properties with @property

Class vs instance variables

isinstance and type checks

Generators with yield

Generator expressions

Decorators

Closures

Context managers (with)

Regex basics with re

datetime: working with dates

🎯 Mini-project: JSON β†’ CSV converter

pathlib for files

defaultdict

namedtuple

Dataclasses

MILESTONE: build a Library system

functools.lru_cache

functools.partial

itertools.chain and product

Enum.Enum

Logging basics

Ternary expressions

Walrus operator :=

Tuple unpacking + swap

any() and all()

min/max with key=

is vs ==

Truthy and falsy values

Mutable default args trap

abs / round / divmod

Conditional unpacking

🎯 Mini-project: Log parser

String case methods

String startswith / endswith

in operator and not in

Dict get() with default

MILESTONE: Phone book CLI

asyncio basics: async/await

asyncio.run() β€” top-level entry

asyncio.gather() for parallel coroutines

Predict: asyncio.sleep ordering

async with / async for

Threading basics β€” predict the output

threading.Lock β€” predict the final counter

queue.Queue β€” producer / consumer

multiprocessing.Pool β€” predict the output

ThreadPoolExecutor β€” predict the output

subprocess.run β€” predict the output

shutil copytree β€” predict

tempfile cleanup β€” predict

urllib status code β€” predict

requests raise_for_status β€” predict

timeit for micro-benchmarks

cProfile basic profiling

logging vs print

argparse for CLI tools

CAPSTONE: Parallel file downloader

__init__ vs __new__

@property β€” computed attributes

super() chaining in inheritance

Multiple inheritance and MRO

ABC β€” abstract base classes

decimal.Decimal β€” precise arithmetic

frozenset β€” immutable, hashable sets

Custom exceptions + raise from

@contextmanager decorator

yield from β€” generator delegation

collections.Counter β€” frequency counts

functools.singledispatch β€” type-based dispatch

Type hints β€” Optional, Union, generics

pathlib β€” modern path handling

datetime arithmetic

JSON β€” dump, load, custom encoder

CSV with DictReader / DictWriter

argparse mini-CLI

logging β€” handlers, levels, formatters

CAPSTONE: CLI todo-app

MINI: Tic-Tac-Toe β€” detect a winner

MINI: Log parser β€” top 3 IPs by error count

MINI: Password strength validator (5-rule scoring)

MINI: Calculator with history (last N results)

MINI: JSON β†’ CSV converter (flatten nested dicts)

Tip: click any lesson to revisit it. After your first attempt, the β€œShow example” button reveals the full solution.