Python Forum
iterating an interator partially then resuming
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iterating an interator partially then resuming
#1
i would like to iterate an iterator in a loop that will usually break out part way through. then later, i want another loop to resume that iteration from where the first one left off. how hard is this to do? what if there is a different need between these loops, perhaps in a function, to iterate that iterator from the beginning, maybe stopping at a different position? what seems like it would be useful is something that can make a stateful view of an iterator.
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
iterating an interator partially then resuming - by Skaperen - Apr-30-2019, 01:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [3.4.4] Last loop element partially done nolme 5 3,156 May-08-2018, 03:25 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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