<doocs>0922.Sort Array By Parity II_1.py
def sortArrayByParityII( nums: List[int]) -> List[int]:
    n, j = len(nums), 1
    for i in range(0, n, 2):
        if (nums[i] & 1) == 1:
            while (nums[j] & 1) == 1:
                j += 2
            nums[i], nums[j] = nums[j], nums[i]
    return nums
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_4 , var_6 = len ( var_0 ) , 1
    for var_10 in range ( 0 , var_4 , 2 ) :
        if ( var_0 [ var_10 ] & 1 ) == 1 :
            while ( var_0 [ var_6 ] & 1 ) == 1 :
                var_6 += 2
            var_0 [ var_10 ] , var_0 [ var_6 ] = var_0 [ var_6 ] , var_0 [ var_10 ]
    return var_0
