pairwise

Adjacent pairs.

from itertools import pairwise
for a, b in pairwise([1,2,3,4]): print(a, b)