30 Sep
2015
30 Sep
'15
5:18 p.m.
Ah good point. Well, in the case of a sequence argument, an enumerate object could be both a sequence and an iterator. On Wed, Sep 30, 2015 at 1:15 PM Alexander Belopolsky < alexander.belopolsky@gmail.com> wrote:
On Wed, Sep 30, 2015 at 12:53 PM, Neil Girdhar
wrote: A Sequence is an Iterator.
No, a Sequence is an Iterable, not an Iterator:
issubclass(collections.Sequence, collections.Iterator) False issubclass(collections.Sequence, collections.Iterable) True