comefrom: <doocs>2295.Replace Elements in an Array_1.py
code: def arrayChange( nums: List[int], operations: List[List[int]]) -> List[int]:
      d = {v: i for i, v in enumerate(nums)}
      for a, b in operations:
          idx = d[a]
          d.pop(a)
          d[b] = idx
      ans = [0] * len(nums)
      for v, i in d.items():
          ans[i] = v
      return ans
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : List [ List [ int ] ] ) -> List [ int ] :
      var_4 = { var_2 : var_3 for var_3 , var_2 in enumerate ( var_0 ) }
      for var_5 , var_6 in var_1 :
          var_7 = var_4 [ var_5 ]
          var_4.pop ( var_5 )
          var_4 [ var_6 ] = var_7
      var_8 = [ 0 ] * len ( var_0 )
      for var_2 , var_3 in var_4.items ( ) :
          var_8 [ var_3 ] = var_2
      return var_8
  