I understand the concept of the Iterator and Generator in Python. But I have below queries:
When I use a generator I get a value one at a time, however according to the iterator concept it gives the output as a whole. So why does the iter() function has next() sub function? for example
rt = "default"
>>> type(iter(rt))
<type 'iterator'>
>>> iter(rt).next()
'd'
So, when we do a iter().next() we are getting single output at a time, so how it is different from generator?
Thank you,