Open this example in the interactive library
Source code
values = [3, 8, 5, 1, 9]
windows = list(zip(values, values[1:], values[2:]))
print(windows)
Sample output
[(3, 8, 5), (8, 5, 1), (5, 1, 9)]

Pack readings into overlapping triples using Python lists and dictionaries.
Open this example in the interactive library
values = [3, 8, 5, 1, 9]
windows = list(zip(values, values[1:], values[2:]))
print(windows)
[(3, 8, 5), (8, 5, 1), (5, 1, 9)]