human
Give me a code to check if a string can be repeated to make another string and the other steps required given the following:
Check if a string can be repeated to make another string | Function to return the count of repetitions of string a to generate string b.
If b cannot be generated by repeating a.
Repeat a count number of times.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check if a string can be repeated to make another string and the other steps required.
 def getCount ( a , b ) :
	if ( len ( b ) % len ( a ) != 0 ) :
		return - 1 ;
	count = int ( len ( b ) / len ( a ) )
	a = a * count
	if ( a == b ) :
		return count
	return - 1 ;
if __name__ == ' _ _ main _ _ ' :
	a = ' geeks '
	b = ' geeksgeeks '
	print ( getCount ( a , b ) )