Given a string and we have to create its multiple copies by using multiplication operator in Python?
If you want to create multiple copies of string, the multiplication operator (*) can be used.
Consider the example – to create N copies of a string
Example:
Input:
str1 = "Hello"
n = 3
logic:
str2 =str1*3
Output:
str2= "HelloHelloHello"
Program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer