classSolution:""" @param A: Given an integers array A @return: An integer array B and B[i]= A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1] """defproductExcludeItself(self,A):# write your code hereB=[]ifA==Noneorlen(A)==0:returnBforiinrange(len(A)):sum=1forjinrange(len(A)):ifi!=j:sum*=A[j]B.append(sum)returnB