#Python's #itertools is a smash isn't it?
https://docs.python.org/3/library/itertools.html
@villares yesssss