Python course
0 of 68 lessons done
+ 1 advanced lessons in S2 Pro - Variables and namesNames point at values
- Numbers and castingint, float and converting between types
- StringsSlicing, methods and f-strings
- Booleans and operatorsComparisons, and, or, not, truthiness
- Chapter review: Python basicsHarder questions on names, numbers, text and truth
- ListsOrdered, changeable sequences
- Tuples and setsFixed groups and unique values
- DictionariesKey and value pairs
- ComprehensionsBuild a list in one line
- Chapter review: collectionsHarder questions on lists, tuples, sets and dictionaries
- If, elif, else and matchChoose what runs
- Loopsfor, while, break and continue
- Functionsdef, return and default values
- *args, **kwargs and lambdaFlexible arguments and tiny functions
- Chapter review: control flow and functionsHarder questions on loops, scope and functions
- Classes and objects__init__, self and methods
- InheritanceReuse and override behaviour
- Errors and exceptionstry, except, else and finally
- Files and JSONRead, write and convert data
- Chapter review: classes, errors and filesHarder questions on objects, exceptions and data
- ClosuresA function that remembers the scope it was created in
- DecoratorsA function that wraps another function
- GeneratorsA function that yields values one at a time
- The iterator protocolWhat `for` actually calls: `__iter__` and `__next__`
- Context managers`with`, and what it guarantees
- *args and **kwargsFunctions that accept any number of arguments
- Unpacking and the walrus operatorDestructure tuples and assign inside an expression
- Type hintsDocument and check the types you intend, without changing runtime behavior
- Dataclasses and enumsLess boilerplate for classes that are mostly data
- Checkpoint: Python, in depthRe-test the whole unit
- Dunder methodsThe methods that make `==`, `print()` and `len()` work on your own classes
- PropertiesA method that reads (or writes) like a plain attribute
- classmethod and staticmethodMethods that don't need a particular instance
- Abstract base classes and mixinsDefine a required interface, and share behavior without a deep hierarchy
- Composition over inheritance"Has-a" instead of "is-a", when that's the better fit
- Checkpoint: Python OOP, masteredRe-test the whole unit
- Counter, defaultdict and dequeThree collections-module types that replace common boilerplate
- itertoolsBuilding blocks for working with iterators
- functoolsreduce, lru_cache and partial
- heapq and bisectA priority queue, and fast lookups in a sorted list
- Regular expressionsPattern matching with the re module
- Checkpoint: The standard libraryRe-test the whole unit
- Big-O notationHow running time grows as input grows
- RecursionA function that calls itself, with a base case to stop
- Recursion patternsDivide-and-conquer, and recursion on trees and nested structures
- MemoizationTrading memory for speed by remembering past results
- Checkpoint: Complexity & recursionRe-test the whole unit
- Testing with pytestFunctions named test_*, and plain assert statements
- LoggingWhy `logging` beats scattering `print()` through real code
- Reading a tracebackPython's error report, read from the bottom up
- Virtual environments and pipWhy every project gets its own isolated set of installed packages
- Checkpoint: Testing, debugging & toolingRe-test the whole unit
- The GILWhy Python threads don't speed up CPU-bound work
- ThreadingRunning I/O-bound work concurrently
- MultiprocessingReal parallelism for CPU-bound work
- asyncioCooperative concurrency with async/await
- Checkpoint: Concurrency basicsRe-test the whole unit
- Command-line argumentsargparse: parsing flags and arguments for a script
- Working with pathspathlib: an object-oriented, cross-platform way to handle file paths
- CSV and JSONReading and writing the two most common data interchange formats
- Making HTTP requestsThe requests library -- the de facto standard for calling APIs from Python
- Checkpoint: Practical PythonRe-test the whole unit
- Your first FastAPI appPath operations: @app.get, @app.post and friends
- Request bodies with PydanticDefine the shape of incoming JSON as a class
- Status codes and error handlingHTTPException, and choosing the right status code
- Dependency injectionDepends(): share logic (auth, a DB session) across routes
- Testing a FastAPI appTestClient: calling your API in tests, without a running server
- Checkpoint: FastAPIRe-test the whole unit
- Python final examS2 ProThe final exam: ~30 minutes, covering the whole course