<qiyuangong>121_Best_Time_to_Buy_and_Sell_Stock_1.py
def maxProfit( prices):
    length = len(prices)
    if length == 0:
        return 0
    max_profit, low = 0, prices[0]
    for i in range(1, length):
        if low > prices[i]:
            low = prices[i]
        else:
            temp = prices[i] - low
            if temp > max_profit:
                max_profit = temp
    return max_profit
def sample_funcname ( var_0 ) :
    var_2 = len ( var_0 )
    if var_2 == 0 :
        return 0
    var_4 , var_5 = 0 , var_0 [ 0 ]
    for var_8 in range ( 1 , var_2 ) :
        if var_5 > var_0 [ var_8 ] :
            var_5 = var_0 [ var_8 ]
        else :
            var_9 = var_0 [ var_8 ] - var_5
            if var_9 > var_4 :
                var_4 = var_9
    return var_4
