<garvit244>1029_1.py
def twoCitySchedCost( costs):
    result = 0
    costs = sorted(costs, key=lambda x : x[0] - x[1])
    for index in range(len(costs)):
        if index < len(costs)//2:
            result += costs[index][0]
        else:
            result += costs[index][1]
    return result
def sample_funcname ( var_0 ) :
    var_2 = 0
    var_0 = sorted ( var_0 , var_4 = lambda var_5 : var_5 [ 0 ] - var_5 [ 1 ] )
    for var_9 in range ( len ( var_0 ) ) :
        if var_9 < len ( var_0 ) // 2 :
            var_2 += var_0 [ var_9 ] [ 0 ]
        else :
            var_2 += var_0 [ var_9 ] [ 1 ]
    return var_2
