Ideas from books, articles & podcasts.
published 2 ideas
🐍 Exploring itertools docs
Returns an infinite iterator that produces evenly spaced values starting with number start.
It's often used in combination with map() to generate consecutive data points, and with zip() to add sequence numbers.
Assume you have three lists and you want to turn them into a table-like structure, where each row has a numeric ID.
You can combine count() with zip() to add sequence numbers to the resulting tuples. See code in image.
❤️ Brainstash Inc.