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

november.nihal at gmail.com november.nihal at gmail.com
Sun Nov 26 06:54:18 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