[Tutor] Is there a library which has this object?

Alan Gauld alan.gauld at yahoo.co.uk
Thu Apr 28 13:46:33 EDT 2016


On 28/04/16 14:53, Yeh wrote:
> Hi,
> Is there a library which can return some numbers continuously? 

You probably want to look at the itertools module.

There you can find among others the count() generator function.
Others of possible interest include cycle() and repeat()

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list