<doocs>2149.Rearrange Array Elements by Sign_1.py
def rearrangeArray( nums: List[int]) -> List[int]:
    ans = [0] * len(nums)
    i, j = 0, 1
    for num in nums:
        if num > 0:
            ans[i] = num
            i += 2
        else:
            ans[j] = num
            j += 2
    return ans
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_5 = [ 0 ] * len ( var_0 )
    var_6 , var_8 = 0 , 1
    for var_9 in var_0 :
        if var_9 > 0 :
            var_5 [ var_6 ] = var_9
            var_6 += 2
        else :
            var_5 [ var_8 ] = var_9
            var_8 += 2
    return var_5
