Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. DreamPie 1.2.1 >>> for x in 'ahoj': ... print(x) a h o j >>> it = iter('ahoj') >>> next(it) 0: 'a' >>> next(it) 1: 'h' >>> next(it) 2: 'o' >>> next(it) 3: 'j' >>> next(it) Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> next(it) StopIteration >>> xs = 'ahoj' >>> it = iter(xs) >>> next(it) 4: 'a' >>> next(it) 5: 'h' >>> for x in it: ... print(x) o j >>>