Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python print string name in pattern

j="ramkumar"
for i in range(len(j)):
    for g in range(0,i+1):
        print(j[g],end=' ')
    print('')
# end='' meaning (print the next answer , near the previous answer in same line)
#answer 1 2 3 4 5 6 like this in same row or same line(in horizontal)



name="ramkumar"
for i in range(len(name)) :
    print(name[0:i+1])
Comment

PREVIOUS NEXT
Code Example
Python :: how to convert .ui file to .py 
Python :: getters and setters in python 
Python :: MAKE A SPHERE IN PYTHON 
Python :: python tkinter text get 
Python :: Find All Occurrences of a Substring in a String in Python 
Python :: run in another thread decorator 
Python :: get name of month python 
Python :: python draw rectangle on image 
Python :: read file csv in python 
Python :: tty escape 
Python :: turn python script into exe 
Python :: median of array python 
Python :: how to get local ip in python 
Python :: code fibonacci python 
Python :: decimal to binary in python 
Python :: same elements of two sets in python 
Python :: python integer to string 
Python :: python find file name 
Python :: insert data in django models 
Python :: python datetime compare date 
Python :: pandas print tabulate no index 
Python :: get column index of maximum value in each row pandas 
Python :: get the time of 1 minute later in python 
Python :: set permissions role discord.py 
Python :: matplotlib different number of subplots 
Python :: php datatables serverside 
Python :: how to add a value to a list in python 
Python :: how append a directory based on current directory python 
Python :: planets list 
Python :: short if python 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =