In this article you will learn about itertools.pairwise, how to use it, and how to generalise it.
Maths is everywhere[citation needed].