rxn.utilities.containers.pairwise
- rxn.utilities.containers.pairwise(s)[source]
Iterates over neighbors in a list.
s -> (s0,s1), (s1,s2), (s2, s3), …
From https://stackoverflow.com/a/5434936
- Parameters
s (
List
[TypeVar
(T
)]) –- Return type
Iterator
[Tuple
[TypeVar
(T
),TypeVar
(T
)]]