Stopping an iterator and continuing later (Posting On Python-List P

november nihal november nihal nospam.nospam.november.nihal at gmail.com
Sat Nov 25 10:54:00 EST 2017


On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro  wrote:
> On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe... at gmail.com
wrote:
> > I worked out how to use iterators to generate values one at a time
> > then ran into a second problem which is time. Is it possible to
> > save an iterator so that i can continue from where I stopped?
>
> Yes. Just stop calling it. Then, when you start again, you will get the
values continuing from that point.

I should have added I switch off the machine when I stop. ( I dont have options
 to keep it in a sleep mode or in hibernation )

NN




More information about the Python-list mailing list