MKMateen Kianiinmilddev.hashnode.dev·Aug 11, 2025 · 6 min readAdding Elements to Python SetsEver noticed how sets can simplify data uniqueness? We often talk about creating and iterating over sets, but the simple act of adding elements is sometimes glossed over. Yet, understanding how the add operation works can save you from silent failure...00
MKMateen Kianiinmilddev.hashnode.dev·Aug 11, 2025 · 5 min readMastering Python Context ManagersIntroduction Context managers play a vital role in Python by ensuring resources like files, locks, and network connections are properly acquired and released. Yet one component often flies under the radar: how the __exit__ method actually manages exc...00
MKMateen Kianiinmilddev.hashnode.dev·Aug 11, 2025 · 3 min readHow to Pretty Print JSON in Python?Introduction Working with JSON in Python is straightforward thanks to the built-in json module. However, when you need to read or share JSON data, the compact output can be hard to scan. A quick fix is to pretty print JSON with indentation and sorted...00
MKMateen Kianiinmilddev.hashnode.dev·Aug 11, 2025 · 2 min readWhat Are Python Decorators?Introduction Python decorators play a key role in extending and modifying behavior of functions or classes without changing their code. They act like wrappers that you place around functions using the @ symbol. This pattern helps you write cleaner, m...00
MKMateen Kianiinmilddev.hashnode.dev·Aug 11, 2025 · 4 min readWhat are the differences between Python Modules and Packages?We all love Python’s simplicity and power, but when it comes to organizing code, things can get confusing fast. Everyone talks about writing functions and classes, yet the subtle difference between a module and a package often gets glossed over. How ...00