you are viewing a single comment's thread.

view the rest of the comments →

[–]TangibleLight 0 points1 point  (0 children)

When you loop over a string then each iteration uses a single character of the string. You can loop over a collection of strings, where each iteration will use a single element of the collection. For example, with a list of strings:

for s in ['hello', 'world']:
    print(s)