Examples Iterate through string Python
Simple example code.
for c in "string": print(c)
Use enumerate() function
Get index and char values. Iterate over character in a string with index.
for i, c in enumerate('Hello'): print(i, c)
Do comment if you have any doubts and suggestions on this Python iterate topic,
Note: IDE: PyCharm 2021.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.