human
Minimum number of deletions so that no two consecutive are same | Function for counting deletions.
If two consecutive characters are the same , delete one of them ..
Driver code.
Function call to print answer"
How can the above be solved in Python?

=====
Write me a code to minimum number of deletions so that no two consecutive are same and the other steps required?
assistant
#Here is code to minimum number of deletions so that no two consecutive are same and the other steps required.
 def countDeletions ( string ) :
	ans = 0
	for i in range ( len ( string ) - 1 ) :
		if ( string [ i ] == string [ i + 1 ] ) :
			ans += 1
	return ans
string = " AAABBB "
print countDeletions ( string )