human
Construct an array from its pair | Fills element in arr [ ] from its pair sum array pair [ ] . n is size of arr [ ].
Driver code"
How can the above be solved in Python?

Write me a code to construct an array from its pair and the other steps required?
assistant
#Here is code to construct an array from its pair and the other steps required.
 def constructArr ( arr , pair , n ) :
	arr [ 0 ] = ( pair [ 0 ] + pair [ 1 ] - pair [ n - 1 ] ) // 2
	for i in range ( 1 , n ) :
		arr [ i ] = pair [ i - 1 ] - arr [ 0 ]
if __name__ == ' _ _ main _ _ ' :
	pair = [ 15 , 13 , 11 , 10 , 12 , 10 , 9 , 8 , 7 , 5 ]
	n = 5
	arr = [ 0 ] * n
	constructArr ( arr , pair , n )
	for i in range ( n ) :
		print ( arr [ i ] , end = " ▁ " )