Python Built-in Functions vs User-Defined Functions
Understand the differences between Python's built-in functions and the functions you write yourself, including performance, availability, and how they work together.
Learn Python programming from scratch
Understand the differences between Python's built-in functions and the functions you write yourself, including performance, availability, and how they work together.
Learn what it means for Python functions to be first-class objects: you can assign them to variables, pass them as arguments, and return them from other functions.
Learn the most common mistakes Python developers make with functions, from mutable defaults to late binding closures, and how to avoid or fix each one.
Learn the principles of writing reusable Python functions: single responsibility, clear interfaces, avoiding global state, and designing for composition.
Learn how to organize Python functions into multiple files, when to split a module, and how to structure imports so your project stays maintainable as it grows.
Learn how to test Python functions using assert statements and simple test patterns, and understand why functions that are pure and self-contained are easier to test.
Put your function skills together by building a small, reusable utility library. Learn how to design, organize, document, and test a collection of related Python functions.
Learn how the Python import statement works, where Python searches for modules, and how to avoid common import pitfalls like naming conflicts and circular dependencies.
Learn the four Python import styles, when to use each one, and how your choice affects code readability and long-term maintainability.
Learn how Python reads from and writes to files on your computer, covering the core open-read-write-close workflow and the tools that make file operations safe.
Learn how the Python with statement automatically closes files, even when errors occur, and why it is the only safe way to manage file resources in production code.
Learn how to read and write large files in Python without running out of memory, using chunked reading, line-by-line iteration, and buffered writes.