Python Practice › Loop Programs › Program 63

Each character on a new line

EasyLoop Programs · 63 of 90

Write a Python program to print each character of a string on a new line.

Advertisement
Input
"Sqatools"
Output
S
q
a
t
o
o
l
s

Approach

  1. Loop over the string; print() adds a newline after each character.

Solution

Python
for ch in "Sqatools":    print(ch)
Output
S
q
a
t
o
o
l
s

Learn the concept

New to this topic? Read the lesson, then come back.

More loop programs

← All 90 Loop Programs

Leave a Comment