st = 'abcd'
for i in st:
next(i)
..............
TypeError: 'str' object is not an iterator
>>> s = 'ABC' #iterable, но не iterator
>>> for char in s:
print(char)
A
B
C
>>> s = 'ABC'
>>> it = iter(s) #а вот уже iterator, созданный из iterable
>>> for i in range(4):
print(next(it))
A
B
C
Traceback (most recent call last):
File "<pyshell#35>", line 2, in <module>
print(next(it))
StopIteration
>>>