pairwise() from the itertools module was added in Python 3.10:
pairwise()
itertools
from itertools import pairwise for a, b in pairwise(["a", "b", "c"]): print(a, b) # Ouput: # a b # b c