next( __next__( continue taking from iteratorwhere left off next(becomes __next__()but use new next(version skew noteas first mentioned in the preceding python also has built-in called xrangewhich is like range but produces items on demand instead of building list of results in memory all at once since this is exactly what the new iterator-based range does in python xxrange is no longer available in --it has been subsumed you may still both see and use it in codethoughespecially since range builds result lists there and so is not as efficient in its memory usage as noted in the prior the file xreadlines(method used to minimize memory use in has been dropped in python for similar reasonsin favor of file iterators the mapzipand filter iterables like rangethe mapzipand filter built-ins also become iterables in to conserve spacerather than producing result list all at once in memory all three not only process iterablesas in xbut also return iterable results in unlike rangethoughthey are their own iterators--after you step through their results oncethey are exhausted in other wordsyou can' have multiple iterators on their results that maintain different positions in those results here is the case for the map built-in we met in the prior as with other iterablesyou can force list with listif you really need onebut the default behavior can save substantial space in memory for large result setsm map(abs(- ) next( next( next( next(mstopiteration map returns an iterablenot list for in mprint(xmap iterator is now emptyone pass only map(abs(- )for in mprint(xmake new iterable/iterator to scan again iteration contexts auto call next( iterations and comprehensions use iterator manuallyexhausts results these do not support len(or indexing