networkx.utils.misc.pairwise

pairwise(iterable, cyclic=False)[source]

s -> (s0, s1), (s1, s2), (s2, s3), …