In this program, we will take a string as input and print each character on new line.
Steps to solve the program
- Take a string as input.
- Using for loop print the each character on a new line.
#Input string
str1 = "python"
#Printing output
for char in str1:
print(char, end="\n")
Output :
p
y
t
h
o
n