How to print a string multiple times in Python

Printing a string multiple times will return multiple lines of a string where each line contains a string multiple times.

Solution for How to print a string multiple times in Python : You can use range() to print a string multiple times Use range(stop) to create a range of 0 to stop where stop is the number of lines desired. Use a for-loop to iterate through this range. In each iteration, concatenate the string to itself by the number of times desired and print the result.


how-to-print-a-string-multiple-times-in-python