human
Sum of values of all possible non | Function to return the required sum.
Find the sum of the array elements.
Every element appears 2 ^ ( n - 1 ) times.
Driver code"
How can the above be solved in Python?
 Can you provide a code to sum of values of all possible non and the other steps required?
assistant
#Here is code to sum of values of all possible non and the other steps required.
 def sum ( arr , n ) :
	sum = 0
	for i in arr :
		sum += i
	sum = sum * pow ( 2 , n - 1 )
	return sum
arr = [ 2 , 1 , 5 , 6 ]
n = len ( arr )
print ( sum ( arr , n ) )