iterators and views of lists
paul.nospam at rudin.co.uk
Wed Dec 16 13:16:03 CET 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:]:
> 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