human
Case | Function to return the sorted string.
Vectors to store the lowercase and uppercase characters.
Sort both the vectors.
If current character is lowercase then pick the lowercase character from the sorted list.
Else pick the uppercase character.
Return the sorted string.
Driver code"
How can the above be solved in Python?

=====
Can you provide a code to case and the other steps required?
assistant
#Here is code to case and the other steps required.
 def getSortedString ( s , n ) :
	v1 = [ ]
	v2 = [ ]
	for i in range ( n ) :
		if ( s [ i ] >= ' a ' and s [ i ] <= ' z ' ) :
			v1 . append ( s [ i ] )
		if ( s [ i ] >= ' A ' and s [ i ] <= ' Z ' ) :
			v2 . append ( s [ i ] )
	v1 = sorted ( v1 )
	v2 = sorted ( v2 )
	i = 0
	j = 0
	for k in range ( n ) :
		if ( s [ k ] >= ' a ' and s [ k ] <= ' z ' ) :
			s [ k ] = v1 [ i ]
			i += 1
		elif ( s [ k ] >= ' A ' and s [ k ] <= ' Z ' ) :
			s [ k ] = v2 [ j ]
			j += 1
	return " " . join ( s )
s = " gEeksfOrgEEkS "
ss = [ i for i in s ]
n = len ( ss )
print ( getSortedString ( ss , n ) )