human
Give me a code to print reverse string after removing vowels and the other steps required given the following:
Print reverse string after removing vowels | Function for replacing the string.
initialize a string of length n.
Traverse through all characters of string.
assign the value to string r from last index of string s.
if s [ i ] is a consonant then print r [ i ].
Driver Code"
Solution in Python:
assistant
#Here is code to print reverse string after removing vowels and the other steps required.
 def replaceOriginal ( s , n ) :
	r = [ ' ▁ ' ] * n
	for i in range ( n ) :
		r [ i ] = s [ n - 1 - i ]
		if ( s [ i ] != ' a ' and s [ i ] != ' e ' and s [ i ] != ' i ' and s [ i ] != ' o ' and s [ i ] != ' u ' ) :
			print ( r [ i ] , end = " " )
	print ( )
if __name__ == " _ _ main _ _ " :
	s = " geeksforgeeks "
	n = len ( s )
	replaceOriginal ( s , n )