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 :: python for loop get iteration number 
Python :: catch error data with except python 
Python :: python show charracter code 
Python :: __new__ python 
Python :: pyqt5 button connect 
Python :: dataframe string find count 
Python :: python null 
Python :: pathlib remove extension 
Python :: how to find in which directory my python code is running 
Python :: python partial 
Python :: download python 2.7 for windows 10 
Python :: How To Display A Background Image With Tkinter 
Python :: pandas dataframe replace inf 
Python :: suppress python vs try/except pass 
Python :: django now template tag 
Python :: python input code 
Python :: add place in certain index python string 
Python :: spotipy currently playing 
Python :: keyboardinterrupt python 
Python :: c++ vs python 
Python :: Converting Dataframe from the multi-dimensional list 
Python :: python 3d array 
Python :: how to use label encoding in python 
Python :: random int python 
Python :: python optional arguments 
Python :: kivy button disable 
Python :: how to reverse a string in python 
Python :: python array input from user 
Python :: python array index range 
Python :: open csv from url python 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =