This tutorial teaches how to work with the Python data structure collections.deque and provides 7 example use cases.
collections.deque
This article teaches you how to use functools.partial, how it works, and when to use it, with clear examples.
functools.partial
Grab a piece of paper and try to fold your way out of this problem.