Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to join 2 iterators
#1
you can join 2 lists with the + operator. but now we are getting iterators where we once got lists. usually they are effectively the same. but the + operator does not create a new iterator referencing the 2 iterators around it. is there a standard way to join 2 iterators? ideally, it would be able to handle more than 2 and a mix of iterators and sequences. if not, then i guess i need to code up another generator.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
how to join 2 iterators - by Skaperen - Sep-11-2019, 07:14 PM
RE: how to join 2 iterators - by buran - Sep-11-2019, 07:16 PM
RE: how to join 2 iterators - by Skaperen - Sep-11-2019, 07:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The difference between os.path.join( and os.sep.join( Pedroski55 2 9,463 Nov-17-2020, 08:38 AM
Last Post: Pedroski55
  itertools.zip_shortest() fo unequal iterators Skaperen 10 6,733 Dec-27-2019, 12:17 AM
Last Post: Skaperen
  iterating over 2 iterators Skaperen 2 2,252 Jun-07-2019, 11:37 PM
Last Post: Skaperen
  SQL select join operation in python(Select.. join) pradeepkumarbe 1 2,238 Feb-14-2019, 08:34 PM
Last Post: woooee
  Iterators mp3909 3 3,032 Mar-16-2018, 09:42 PM
Last Post: nilamo
  2 iterators or generators Skaperen 1 33,199 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