comefrom: <doocs>0238.Product of Array Except Self_1.py
code: def productExceptSelf( nums: List[int]) -> List[int]:
      n = len(nums)
      ans = [1] * n
      left = right = 1
      for i in range(n):
          ans[i] = left
          left *= nums[i]
      for i in range(n - 1, -1, -1):
          ans[i] *= right
          right *= nums[i]
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_4 = len ( var_0 )
      var_6 = [ 1 ] * var_4
      var_8 = var_7 = 1
      for var_10 in range ( var_4 ) :
          var_6 [ var_10 ] = var_8
          var_8 *= var_0 [ var_10 ]
      for var_10 in range ( var_4 - 1 , - 1 , - 1 ) :
          var_6 [ var_10 ] *= var_7
          var_7 *= var_0 [ var_10 ]
      return var_6
  