How to do multiple things at once without blocking your program.
Posts for: #python
Python 101 - 27: Building Your Own Context Managers
How to create custom context managers to automate setup and teardown tasks.
Python 101 - 26: Files and the 'with' Keyword
How to read, write, and append to files safely using Context Managers.
Python 101 - 25: Pydantic Models
How to use Pydantic models for data validation, type coercion, and serialization in Python.
Python 101 - 24: Type Hinting & Validation
Python type hints to write cleaner code, and how to use Pydantic to validate data.
Python 101 - 23: Modules & Packages
How to organize your Python project into modules and packages using imports.
Python 101 - 22: Object-Oriented Programming (OOP)
Core concepts of Object-Oriented Programming (OOP) in Python.
Python 101 - 21: Mutable Default Arguments
Why you should never use empty lists or dicts as default arguments.
Python 101 - 20: Error Handling
How to use Try/Except blocks to deal with errors and keep your program running smoothly.
Python 101 - 19: Decorators
How to wrap functions to add new behavior without changing your original code.
Python 101 - 18: Functions with *args and **kwargs
Writing functions that can accept any number of inputs, and how to unpack data directly into function calls.
Python 101 - 17: Lambda, Map, and Filter
How to use lambda functions, map, and filter.
Python 101 - 16: Max, Min, Sum, and Zip
How to use Python's built-in functions like max, min, and sum, along with pairing data using the zip function.
Python 101 - 15: Essential String Methods
How to join, split, find, and replace text
Python 101 - 14: Nested Functions
LEGB rule, closures, and variable scope management using the global and nonlocal keywords.
Python 101 - 13: Type Conversion (Casting)
How to convert between strings, numbers, and booleans.
Python 101 - 12: Dictionaries
How to use Dictionaries (JSON's Python twin) for storing structured data.
Python 101 - 11: Unpacking
Extract data from lists and tuples with unpacking
Python 101 - 10: Generators
How to handle massive datasets without crashing your computer by using "Lazy" evaluation and the yield keyword.
Python 101 - 9: For, While, and List Comprehensions
How to repeat actions in Python with loops
Python 101 - 8: Lists and Tuples
How to manage flexible lists and use immutable tuples
Python 101 - 7: Functions
How to organize your code into reusable blocks using functions, parameters, and return values.
Python 101 - 6: If, Else, and Match
Making decisions with If/Else statements and the modern Match/Case syntax.
Python 101 - 5: Booleans and Logic
Understanding True/False values, comparison operators, and how Python evaluates truthiness.
Python 101 - 4: Escaping and Advanced F-Strings
How to handle special characters and format numbers.
Python 101 - 3: Working with Text (Strings)
How to store, combine, and slice text in Python.
Python 101 - 2: Arithmetic
How to handle math, update variables, and some basic types.
Python 101 - 1: Variables, print(), and Comments
How to name variables, display them, and write notes.