In this program, we will print each word on new line from the string.
Steps to solve the program
- Take a string as input.
- Use for loop to iterate over each character from the string.
- Print the character on the new line.
str1 = "Sqatools"
for char in str1:
print(char,end="\n")
Output :
S
q
a
t
o
o
l
s