(Sep-19-2020, 03:33 AM)deanhystad Wrote: A range object is an iterator that produces a sequence of integers.
There are iterables and iterators. Range is iterable but not iterator. Of course we can get iterator out of it as from any iterable but it doesn't change the fact that range is iterable and not iterator.
Iterators support next(), range does not; we can loop range without consuming it, range have length and supports indexing all of which is not possible with iterators.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.