human
Sort a string without altering the position of vowels | Function to sort the string leaving the vowels unchanged.
Length of string S.
Traverse the string S.
Sort the string temp.
Pointer to traverse the sorted string of consonants.
Traverse the string S.
Driver Code"
How can the above be solved in Python?

=====
Give me a code to sort a string without altering the position of vowels and the other steps required?
assistant
#Here is code to sort a string without altering the position of vowels and the other steps required.
 def sortStr ( S ) :
	N = len ( S )
	temp = " "
	for i in range ( N ) :
		if ( S [ i ] != ' a ' and S [ i ] != ' e ' and S [ i ] != ' i ' and S [ i ] != ' o ' and S [ i ] != ' u ' ) :
			temp += S [ i ]
	if ( len ( temp ) ) :
		p = list ( temp )
		p . sort ( )
		temp = ' ' . join ( p )
	ptr = 0
	for i in range ( N ) :
	S = list ( S )
	if ( S [ i ] != ' a ' and S [ i ] != ' e ' and S [ i ] != ' i ' and S [ i ] != ' o ' and S [ i ] != ' u ' ) :
		S [ i ] = temp [ ptr ]
		ptr += 1
	print ( ' ' . join ( S ) )
if __name__ == " _ _ main _ _ " :
	S = " geeksforgeeks "
	sortStr ( S )