human
Number of words in a camelcase sequence | Function to find the count of words in a CamelCase sequence.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to number of words in a camelcase sequence and the other steps required.
 def countWords ( str ) :
	count = 1
	for i in range ( 1 , len ( str ) - 1 ) :
		if ( str [ i ] . isupper ( ) ) :
			count += 1
	return count
str = " geeksForGeeks " ;
print ( countWords ( str ) )