human
Recursive program to insert a star between pair of identical characters | Function to insert * at desired position.
Append current character.
If we reached last character.
If next character is same , append '*.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to recursive program to insert a star between pair of identical characters and the other steps required.
 def pairStar ( Input , Output , i = 0 ) :
	Output = Output + Input [ i ]
	if ( i == len ( Input ) - 1 ) :
		print ( Output )
		return ;
'
	if ( Input [ i ] == Input [ i + 1 ] ) :
		Output = Output + ' * ' ;
	pairStar ( Input , Output , i + 1 ) ;
if __name__ == " _ _ main _ _ " :
	Input = " geeks "
	Output = " "
	pairStar ( Input , Output ) ;