human
Min flips of continuous characters to make all characters same in a string | To find min number of flips in binary string.
If last character is not equal to str [ i ] increase res.
To return min flips.
Driver Code"
Solution in Python:
 Can you provide a code to min flips of continuous characters to make all characters same in a string and the other steps required?
assistant
#Here is code to min flips of continuous characters to make all characters same in a string and the other steps required.
 def findFlips ( str , n ) :
	last = ' ▁ '
	res = 0
	for i in range ( n ) :
		if ( last != str [ i ] ) :
			res += 1
		last = str [ i ]
	return res // 2
if __name__ == " _ _ main _ _ " :
	str = "00011110001110"
	n = len ( str )
	print ( findFlips ( str , n ) )