human
Encrypt a string by repeating i | Function to return the encrypted string.
Number of times the current character will be repeated.
Repeat the current character in the encrypted string.
Driver code"
Solution in Python:
assistant
#Here is code to encrypt a string by repeating i and the other steps required.
 def encryptString ( string , n ) :
	i , cnt = 0 , 0
	encryptedStr = " "
	while i < n :
		cnt = i + 1
		while cnt > 0 :
			encryptedStr += string [ i ]
			cnt -= 1
		i += 1
	return encryptedStr
if __name__ == " _ _ main _ _ " :
	string = " geeks "
	n = len ( string )
	print ( encryptString ( string , n ) )