human
Give me a code to c ++ program to concatenate a string given number of times and the other steps required given the following:
C ++ program to concatenate a string given number of times | Function which return string by concatenating it ..
Copying given string to temporary string ..
Concatenating strings.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to c ++ program to concatenate a string given number of times and the other steps required.
 def repeat ( s , n ) :
	s1 = s
	for i in range ( 1 , n ) :
		s += s1
	return s
s = " geeks "
n = 3
print ( repeat ( s , n ) )