Print each character on new line

In this program, we will take a string as input and print each character on new line.

Steps to solve the program
  1. Take a string as input.
  2. 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
				
			

print a string 3 times

get all the email id’s from given string

Leave a Comment