human
Find the maximum possible Binary Number from given string | Function to return maximum number that can be formed from the string.
To store the frequency of ' z ' and ' n ' in the given string.
Number of zeroes.
Number of ones.
To store the required number.
Add all the ones.
Add all the zeroes.
Driver code"
Solution in Python:

What is a code to find the maximum possible Binary Number from given string and the other steps required?
assistant
#Here is code to find the maximum possible Binary Number from given string and the other steps required.
 def maxNumber ( string , n ) :
	freq = [ 0 , 0 ]
	for i in range ( n ) :
		if ( string [ i ] == ' z ' ) :
			freq [ 0 ] += 1 ;
		elif ( string [ i ] == ' n ' ) :
			freq [ 1 ] += 1 ;
	num = " " ;
	for i in range ( freq [ 1 ] ) :
		num += '1' ;
	for i in range ( freq [ 0 ] ) :
		num += '0' ;
	return num ;
if __name__ == " _ _ main _ _ " :
	string = " roenenzooe " ;
	n = len ( string ) ;
	print ( maxNumber ( string , n ) ) ;