SyntaxFix
Write A Post
Hire A Developer
Questions
In addition to all the mentions of StopIteration, the Python "for" loop simply does what you want:
>>> it = iter("hello") >>> for i in it: ... print i ... h e l l o