human
Give me a code to maximum triplet sum in array and the other steps required given the following:
Maximum triplet sum in array | Python 3 code to find maximum triplet sum.
Initialize sum with INT_MIN.
Driven code"
How can the above be solved in Python?
assistant
#Here is code to maximum triplet sum in array and the other steps required.
 def maxTripletSum ( arr , n ) :
	sm = - 1000000
	for i in range ( 0 , n ) :
		for j in range ( i + 1 , n ) :
			for k in range ( j + 1 , n ) :
				if ( sm < ( arr [ i ] + arr [ j ] + arr [ k ] ) ) :
					sm = arr [ i ] + arr [ j ] + arr [ k ]
	return sm
arr = [ 1 , 0 , 8 , 6 , 4 , 2 ]
n = len ( arr )
print ( maxTripletSum ( arr , n ) )