@trey.ioTrey Hunner @trey.io
2026-11-24 04:16 UTC
Need more than 2 items at a time? The itertools docs also include a sliding_window recipe. Or you could use third-party modules, like more-itertools: >>> from more_itertools import sliding_window >>> list(sliding_window(temperatures, 3)) [(49, 52, 58), (52, 58, 55), (58, 55, 55), (55, 55, 60)]
A reply in a thread.
1 likes, 0 reposts, 0 replies
3 Next post4 More from @trey.ioBackBluesky home