human
Give me a code to product of all non repeating Subarrays of an Array and the other steps required given the following:
Product of all non repeating Subarrays of an Array | Function to find the product of all non - repeating Subarrays of an Array.
Finding the occurrence of every element.
Iterating through the array and finding the product.
We are taking the power of each element in array with the occurrence and then taking product of those ..
Driver code"
How can the above be solved in Python?
assistant
#Here is code to product of all non repeating Subarrays of an Array and the other steps required.
 def product ( arr ) :
	occurrence = pow ( 2 , len ( arr ) - 1 ) ;
	product = 1 ;
	for i in range ( 0 , len ( arr ) ) :
		product *= pow ( arr [ i ] , occurrence ) ;
	return product ;
arr = [ 10 , 3 , 7 ] ;
print ( product ( arr ) ) ;