iterators and views of lists
Paul Rudin
paul.nospam at rudin.co.uk
Wed Dec 16 07:16:03 EST 2009
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> I'm sympathetic to your request for list views. I've often wanted some
> way to cleanly and neatly do this:
>
> for item in seq[1:]:
> process(item)
>
> without making an unnecessary copy of almost all of seq.
>
I don't know how it's implemented - but presumably itertools.islice
could provide what you're asking for?
More information about the Python-list
mailing list