<doocs>1946.Largest Number After Mutating Substring_1.py
def maximumNumber( num: str, change: List[int]) -> str:
    find = False
    nums = list(num)
    for i, c in enumerate(num):
        if int(c) < change[int(c)]:
            nums[i] = str(change[int(c)])
            find = True
        elif find and int(c) == change[int(c)]:
            continue
        elif find:
            break
    return ''.join(nums)
def sample_funcname ( var_0 : str , var_2 : List [ int ] ) -> str :
    var_6 = False
    var_8 = list ( var_0 )
    for var_10 , var_11 in enumerate ( var_0 ) :
        if int ( var_11 ) < var_2 [ int ( var_11 ) ] :
            var_8 [ var_10 ] = str ( var_2 [ int ( var_11 ) ] )
            var_6 = True
        elif var_6 and int ( var_11 ) == var_2 [ int ( var_11 ) ] :
            continue
        elif var_6 :
            break
    return ''.join ( var_8 )
