37 Program to printing each character for 3 times in Python

Program:

# printing each character for  3 times

x='python'

for p in x: # p indicates each element of x    i.e p,y,t,h,o,n

    print(p*3) # printing each element 3 times


Output:

Program to printing each character for 3 times in Python

Previous
Next Post »