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 :: adam optimizer keras learning rate degrade 
Python :: word counter python 
Python :: how to find length of list python 
Python :: NLP text summarization with Luhn 
Python :: Python script for computing descriptive statistics 
Python :: create a database in python 
Python :: logical operators python 
Python :: how to open cmd and run code using python 
Python :: Converting Categorical variables in to integers using Dummy 
Python :: dict get value by index 
Python :: python curses for windows 
Python :: pandas knn imputer 
Python :: split the column value and take first value in pandas 
Python :: write python 
Python :: get webpage python 
Python :: fizz buzz in python 
Python :: To create a SparkSession 
Python :: check if any letter in string python 
Python :: palindrome words python 
Python :: python append row to 2d array 
Python :: python Sort the dictionary based on values 
Python :: python - caéculate the average based on the level of a second column in a df 
Python :: check space in string python 
Python :: hyperparameters 
Python :: python google docs api how to get doc index 
Python :: intersection of three arrays 
Python :: sns.heatmap 
Python :: solve linear system python 
Python :: arrays in python 
Python :: how to convert string to float in python 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =