human
Replace all consonants with nearest vowels in a string | Function to replace consonant with nearest vowels.
Driver code"
Solution in Python:
 What is a code to replace all consonants with nearest vowels in a string and the other steps required?
assistant
#Here is code to replace all consonants with nearest vowels in a string and the other steps required.
 def replacingConsonants ( s ) :
	nVowel = " aaaeeeeiiiiioooooouuuuuuuu "
	for i in range ( 0 , len ( s ) ) :
		s = s . replace ( s [ i ] , nVowel [ ord ( s [ i ] ) - 97 ] )
	return s
s = " geeksforgeeks " ;
print ( replacingConsonants ( s ) ) ;