[Baypiggies] a python puzzle

Glen Jarvis glen at glenjarvis.com
Wed Apr 14 18:27:21 CEST 2010


> i should add the for my real use-case, the iterables going in will not
> be lists, they'll be lazily generated, and very large, so
> i dont want to read them into memory to get the last element or  
> slice them


I haven't seen the code that you sent (on iPhone now). But, is the  
izip (for iterables) helpful. It's in itertools.

There are some very sharp tools in itertools. I'd be surprised I'd  
they didn't supply a good deal of the functionality (that I imagine)  
you are looking for.

Cheers,


Glen


More information about the Baypiggies mailing list