human
Remove all 1 s from the adjacent left of 0 s in a Binary Array | Function to find the maximum number of 1 's before 0.
Traverse the array.
If value is 1.
If consecutive 1 followed by 0 , then update the maxCnt.
Print the maximum consecutive 1 's  followed by 0.
Driver Code.
Function Call.
Function Call"
How can the above be solved in Python?
 Write me a code to remove all 1 s from the adjacent left of 0 s in a Binary Array and the other steps required?
assistant
#Here is code to remove all 1 s from the adjacent left of 0 s in a Binary Array and the other steps required.
 def noOfMoves ( arr , n ) :
	cnt = 0
	maxCnt = 0
	for i in range ( n ) :
		if ( arr [ i ] == 1 ) :
			cnt += 1
		else :
			if ( cnt != 0 ) :
				maxCnt = max ( maxCnt , cnt )
				cnt = 0
	print ( maxCnt )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 0 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 1 ]
	N = len ( arr )
	noOfMoves ( arr , N )
	arr1 = [ 1 , 0 , 1 , 0 , 1 , 0 , 1 , 0 ]
	N = len ( arr1 )
	noOfMoves ( arr1 , N )