Python Intermediate

This is where your Python starts to look like a pro wrote it. Sixteen tutorials cover modules, packages, iterators, generators, closures, decorators, context managers, regex, the collections module, datetime, and logging. These are the tools that show up in every serious codebase.

Big O Notation in Python, Explained with Real Timings

Big O notation is the language engineers use to describe how an algorithm’s cost grows as the input gets bigger, and once you can read it you stop guessing about performance and start predicting it. This post skips the heavy math and instead runs real timeit measurements so you can watch O(1), O(log n), O(n), O(n log n), and O(n squared) behave exactly the way the theory says they will. “Premature optimization is the root of all evil.” Donald Knuth, ... Read More

Python: Advanced Comprehensions, Nested, Generator Expressions, Performance

Take your Python comprehension skills past the basics. You will master nested comprehensions for multi-dimensional data, generator expressions for memory-efficient pipelines, and the performance facts that decide when a comprehension wins and when a plain for loop is the smarter choice. “Flat is better than nested.” Tim Peters, PEP 20 Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: 17 minutes You already know the basic python comprehension. Something like [x * 2 for ... Read More

Python: Collections Module (Counter, defaultdict, deque, namedtuple)

The complete Python collections module reference: Counter, defaultdict, deque, and namedtuple with tested examples and performance notes, plus quick guidance on OrderedDict and ChainMap, and a clear signal for when to reach for each one instead of the built-in types. “Program testing can be used to show the presence of bugs, but never to show their absence!” Edsger Dijkstra, Notes on Structured Programming Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: 14 minutes ... Read More