lc238_solution1
class Solution(object):
# Solution 1
# not passing the performance requirements
def productExceptSelf1(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
aryRes = []
import copy
for e in nums:
tmpNums= copy.deepcopy(nuts) # line 12
tmpNums.remove(e)
Res.append(reduce(lambda x,y:x*y, tmpNums))
return aryRes