← Python from Scratch Lesson 28 of 78 · 5 XP

Warm-up: letter by letter warm-up

Theory and problem statement

Machine translation, not yet reviewed by a native speaker.

for goes through things one by one. Give it a string and it walks over every letter:

for letter in "cat":
    print(letter)

It prints c, a, t — each on its own line.

Task. Read a word and print each of its letters on a separate line.

Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.