<doocs>2295.Replace Elements in an Array_1.py
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
def sample_funcname ( var_0 : List [ int ] , var_3 : List [ List [ int ] ] ) -> List [ int ] :
    var_7 = { var_4 : var_5 for var_5 , var_4 in enumerate ( var_0 ) }
    for var_8 , var_9 in var_3 :
        var_10 = var_7 [ var_8 ]
        var_7.pop ( var_8 )
        var_7 [ var_9 ] = var_10
    var_14 = [ 0 ] * len ( var_0 )
    for var_4 , var_5 in var_7.items ( ) :
        var_14 [ var_5 ] = var_4
    return var_14
