Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

what if we multiply a string in python

print("Hi you pythonishta 
 " * 100)
Comment

how to multiply a string in python

#Python 2.x:
#print 'string' * (number of iterations)
print '-' * 3


#Python 3.x:
#print ('string' * (number of iterations))
print('-' * 3)
Comment

python multiply string

n = 5
string = "a"

output = string * n

print(output)

## Output:
# aaaaa
Comment

PREVIOUS NEXT
Code Example
Python :: know datatype of pandas 
Python :: python hide input 
Python :: How to change values in a pandas DataFrame column based on a condition in Python 
Python :: numpy array input 
Python :: root mean square python signal 
Python :: what is wsgi 
Python :: python set remove multiple elements 
Python :: settings urls 
Python :: run calc.exe inside python 
Python :: how to update list in python 
Python :: pandas append csv file 
Python :: replace nan numpy array 
Python :: WebDriverWait 
Python :: python how to calculate how much time code takes 
Python :: install fasttext python 
Python :: 3 dimensional array numpy 
Python :: split datetime to date and time pandas 
Python :: flask remove file after send_file 
Python :: get token from request django 
Python :: start python virtual 
Python :: xticks label matplotlib 
Python :: making a virtual environment python 
Python :: button in python 
Python :: numpy array with 2 times each value 
Python :: check python version windows 
Python :: re.compile example 
Python :: sort an array python 
Python :: python program to switch first and second characters in a string 
Python :: cumulative percentaile pandas 
Python :: webscrapping with python 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =