<doocs>1409.Queries on a Permutation With Key_1.py
def processQueries( queries: List[int], m: int) -> List[int]:
    p = list(range(1, m + 1))
    ans = []
    for v in queries:
        j = p.index(v)
        ans.append(j)
        p.pop(j)
        p.insert(0, v)
    return ans
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> List [ int ] :
    var_7 = list ( range ( 1 , var_3 + 1 ) )
    var_8 = [ ]
    for var_9 in var_0 :
        var_11 = var_7.index ( var_9 )
        var_8.append ( var_11 )
        var_7.pop ( var_11 )
        var_7.insert ( 0 , var_9 )
    return var_8
