human
Remove consecutive alphabets which are in same case | Function to return the modified string.
Traverse through the remaining characters in the string.
If the current and the previous characters are not in the same case then take the character.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to remove consecutive alphabets which are in same case and the other steps required.
 def removeChars ( s ) :
	modifiedStr = " "
	modifiedStr += s [ 0 ]
	for i in range ( 1 , len ( s ) ) :
		if ( s [ i ] . isupper ( ) and s [ i - 1 ] . islower ( ) or s [ i ] . islower ( ) and s [ i - 1 ] . isupper ( ) ) :
			modifiedStr += s [ i ]
	return modifiedStr
if __name__ == " _ _ main _ _ " :
	s = " GeeksForGeeks "
	print ( removeChars ( s ) )