Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iterating over 2 iterators
#2
https://docs.python.org/3/library/functions.html#zip Wrote:zip(*iterables)
Make an iterator that aggregates elements from each of the iterables.

Returns an iterator of tuples, where the i-th tuple contains the i-th element from each of the argument sequences or iterables. The iterator stops when the shortest input iterable is exhausted. With a single iterable argument, it returns an iterator of 1-tuples. With no arguments, it returns an empty iterator. ...
Reply


Messages In This Thread
iterating over 2 iterators - by Skaperen - Jun-07-2019, 01:04 PM
RE: iterating over 2 iterators - by Yoriz - Jun-07-2019, 01:12 PM
RE: iterating over 2 iterators - by Skaperen - Jun-07-2019, 11:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  itertools.zip_shortest() fo unequal iterators Skaperen 10 6,881 Dec-27-2019, 12:17 AM
Last Post: Skaperen
  how to join 2 iterators Skaperen 2 2,722 Sep-11-2019, 07:19 PM
Last Post: Skaperen
  Iterators mp3909 3 3,069 Mar-16-2018, 09:42 PM
Last Post: nilamo
  2 iterators or generators Skaperen 1 35,889 Jan-04-2018, 07:41 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020