Write elegant Python code

A series of articles that teaches you how to make the best use of the core Python features. The Pydon'ts are available as an e-book that you can read for free below.

In this Pydon't we conclude the slicing trilogy and take a look at the inner workings of Python slicing, from the built-in slice type to the dunder method __getitem__ and its siblings.


In this Pydon't we cover advanced topics related to sequence slicing, like (negative) steps, more idiomatic sequence slicing, slice assignment, and slice deletion.