🐍
Python Foundations
L1· 174 lessonsFrom zero to confident with Python basics
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, no 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
🔒Predict: print with comma
🔒Predict: f-string + variables
🔒List & append — write code
🔒Quiz: which type is immutable?
🔒Quiz: what does len() return?
🔒Division // and % — write code
🔒Quiz: what does a function without return return?
🔒🎯 Review · build + look up a contact book
🔒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: forgotten return
🔒Quiz: what does .lower() return?
🔒🎯 Review · text stats with functions
🔒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?
🔒FINAL: TODO-list mini-project
🔒🎯 Review · safe CSV parser
🔒*args — variable arguments
🔒**kwargs — keyword arguments
🔒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
🔒Classes: defining your own type
🔒Class methods and static methods
🔒super(): calling the parent
🔒Magic methods: __str__ and __eq__
🔒Properties with @property
🔒Class vs instance variables
🔒isinstance and type checks
🔒datetime: working with dates
🔒🎯 Mini-project: JSON → CSV converter
🔒MILESTONE: build a Library system
🔒itertools.chain and product
🔒Mutable default args trap
🔒🎯 Mini-project: Log parser
🔒String startswith / endswith
🔒MILESTONE: Phone book CLI
🔒asyncio basics: async/await
🔒asyncio.run() — top-level entry
🔒asyncio.gather() for parallel coroutines
🔒Predict: asyncio.sleep ordering
🔒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
🔒CAPSTONE: Parallel file downloader
🔒@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
🔒JSON — dump, load, custom encoder
🔒CSV with DictReader / DictWriter
🔒logging — handlers, levels, formatters
🔒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.