<doocs>2191.Sort the Jumbled Numbers_1.py
def sortJumbled( mapping: List[int], nums: List[int]) -> List[int]:
    m = []
    for i, v in enumerate(nums):
        a, b, t = v, 0, 1
        while 1:
            a, x = divmod(a, 10)
            x = mapping[x]
            b = x * t + b
            t *= 10
            if a == 0:
                break
        m.append((b, i, v))
    m.sort()
    for i, v in enumerate(m):
        nums[i] = v[2]
    return nums
def sample_funcname ( var_0 : List [ int ] , var_3 : List [ int ] ) -> List [ int ] :
    var_4 = [ ]
    for var_6 , var_7 in enumerate ( var_3 ) :
        var_8 , var_10 , var_12 = var_7 , 0 , 1
        while 1 :
            var_8 , var_15 = divmod ( var_8 , 10 )
            var_15 = var_0 [ var_15 ]
            var_10 = var_15 * var_12 + var_10
            var_12 *= 10
            if var_8 == 0 :
                break
        var_4.append ( ( var_10 , var_6 , var_7 ) )
    var_4.sort ( )
    for var_6 , var_7 in enumerate ( var_4 ) :
        var_3 [ var_6 ] = var_7 [ 2 ]
    return var_3
