Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Commit 9448118

Browse files
committed
Added credit for the original pairwise implementation.
1 parent 1e2e1e0 commit 9448118

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

project/functionality/utility.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ def pairwise(iterable):
66
Steps through an iterable while looking ahead
77
one item every iteration.
88
9+
Modified from the implementation here:
10+
https://stackoverflow.com/a/5434936/10444096
11+
912
Example:
1013
for current, next in pairwise([1,2,3,4]):
1114
print(current, next)

0 commit comments

Comments
 (0)