Language
- K2A-D1-1Python BasicsFeb 10, 2022
Python runtime model, comments, dynamic typing, casts, `is` vs `==`, truthiness, naming, indentation, and the `__main__` idiom, anchored against C++
- K2A-D1-2Python Variables and ReferencesMar 5, 2022
Name binding semantics, multiple assignment, unpacking, LEGB scope, `global`/`nonlocal`, the mutable-default trap, augmented assignment, and `copy`/`deepcopy`
- K2A-D1-3Python Strings and FormattingMar 28, 2022
`str` is immutable Unicode, slicing, methods, f-strings, `.format()`, raw and triple-quoted strings, escape sequences, and `bytes` vs `str`
- K2A-D1-4Python Numbers and OperatorsApr 20, 2022
`int` with arbitrary precision, `float`, `complex`, `/` vs `//`, `**`, `divmod`, bit ops, comparison chaining, and the `math`/`decimal`/`fractions` modules
- K2A-D1-5Python Lists, Tuples, and ComprehensionsMay 15, 2022
`list` (mutable) vs `tuple` (immutable), slicing semantics, sorting with `key=`, copying, and list/dict/set comprehensions
- K2A-D1-6Python Dicts and SetsJun 8, 2022
`dict` (insertion-ordered hash map since 3.7), `set`/`frozenset`, set algebra, and the `collections` module, `defaultdict`, `Counter`, `OrderedDict`, `ChainMap`
- K2A-D1-7Python Control FlowJul 2, 2022
`if`/`elif`/`else`, conditional expressions, `for`/`while` loops, the `else` clause on loops, `match`/`case` pattern matching, and the walrus operator `:=`
- K2A-D1-8Python Functions and DecoratorsJul 28, 2022
`def`, default arguments, positional/keyword-only parameters, `*args`/`**kwargs`, argument unpacking, `lambda`, closures, decorators (with and without arguments), `functools.wraps`, and useful built-in decorators
- K2A-D1-9Python Type HintsMay 15, 2023
PEP 484 annotations, built-in generic types (PEP 585), `Optional`/`Union`/`|`, `TypeVar` generics, `Protocol` (structural typing), `TypedDict`, `Literal`/`Final`, and how `mypy` differs from runtime
- K2A-D1-10Python Classes and Data ModelAug 22, 2022
`class` syntax, instance/class/static methods, inheritance and MRO, dunder methods (`__init__`, `__repr__`, `__eq__`, `__hash__`, etc.), `@property`, `@dataclass`, `__slots__`, and abstract base classes
- K2A-D1-11Python Iterators and GeneratorsOct 12, 2022
The iterator protocol (`__iter__`/`__next__`/`StopIteration`), `iter`/`next`, generator functions with `yield`, generator expressions, `yield from`, and the `itertools` building blocks
- K2A-D1-12Python Exceptions and Context ManagersJan 10, 2023
`try`/`except`/`else`/`finally`, `raise` and exception chaining, the exception hierarchy, custom exceptions, the `with` statement and writing custom context managers, `contextlib`, and `assert`
- K2A-D1-13Python Modules and PackagesFeb 28, 2023
`import` forms, modules vs packages, `__init__.py`, relative imports, `sys.path`, the `__main__` idiom, virtual environments, and modern project metadata (`pyproject.toml`)
- K2A-D1-14Python Concurrency and asyncioSep 22, 2023
The GIL, `threading` for I/O, `multiprocessing` for CPU, `concurrent.futures` executors, and `asyncio` (event loop, `async`/`await`, tasks, `gather`), when to choose which
- K2A-D1-15Python argparse and CLINov 18, 2022
Building command-line tools with `argparse`, `ArgumentParser`, positional and optional arguments, types/choices/nargs, actions, mutually exclusive groups, subcommands, and modern alternatives like `click` and `typer`