human
Write me a code to maximum number of pair reductions possible on a given triplet and the other steps required given the following:
Maximum number of pair reductions possible on a given triplet | Function to count the maximum number of pair reductions possible on a given triplet.
Convert them into an array.
Stores count of operations.
Sort the array.
If the first two array elements reduce to 0.
Apply the operations.
Increment count.
Print the maximum count.
Given triplet"
How can the above be solved in Python?
assistant
#Here is code to maximum number of pair reductions possible on a given triplet and the other steps required.
 def maxOps ( a , b , c ) :
	arr = [ a , b , c ]
	count = 0
	while True :
		arr . sort ( )
		if not arr [ 0 ] and not arr [ 1 ] :
		break
		arr [ 1 ] -= 1
		arr [ 2 ] -= 1
		count += 1
	print ( count )
a , b , c = 4 , 3 , 2
maxOps ( a , b , c )