input: 
  def max_revenue(prices):
      """ Calculate the maximum revenue that can be obtained by buying and selling
      at different points in the list of prices. Each price represents the stock 
      price at a given day. The strategy is to find the maximum difference 
      between consecutive prices.
      >>> max_revenue([10, 7, 5, 8, 11, 9])
      6
      >>> max_revenue([1, 2, 3, 4, 5, 6])
      5
      >>> max_revenue([6, 5, 4, 3, 2, 1])
      0
      """
      diff = [prices[i + 1] - prices[i] for i in range(len(prices) - 1)] 
      max_diff = 0
      for i in range(len(diff)): 
          for j in range(i + 1, len(diff) + 1): 
              current_diff = sum(diff[i:j]) 
              if current_diff > max_diff: 
                  max_diff = current_diff 
   
      return max_diff
  
output:     
      diff = [prices[i + 1] - prices[i] for i in range(len(prices) - 1)] 
      max_diff = 0
      current_sum = 0
      for d in diff:
          current_sum = max(0, current_sum + d)
          max_diff = max(max_diff, current_sum)
   
      return max_diff
  