<doocs>2200.Find All K-Distant Indices in an Array_1.py
def findKDistantIndices( nums: List[int], key: int, k: int) -> List[int]:
    ans = []
    n = len(nums)
    for i in range(n):
        for j in range(n):
            if abs(i - j) <= k and nums[j] == key:
                ans.append(i)
                break
    return ans
def sample_funcname ( var_0 : List [ int ] , var_3 : int , var_4 : int ) -> List [ int ] :
    var_5 = [ ]
    var_7 = len ( var_0 )
    for var_9 in range ( var_7 ) :
        for var_10 in range ( var_7 ) :
            if abs ( var_9 - var_10 ) <= var_4 and var_0 [ var_10 ] == var_3 :
                var_5.append ( var_9 )
                break
    return var_5
