Print each word on new line from the string.

In this program, we will print each word on new line from the string.

Steps to solve the program
  1. Take a string as input.
  2. Use for loop to iterate over each character from the string.
  3. 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
				
			

display numbers from a list

create an empty list and add even numbers from 1-10

Leave a Comment