input: def max_revenue(prices):
      """ Calculate the maximum revenue that can be obtained by buying and selling a stock once.
      The input is a list of prices where each element represents the stock price on a different day.
      The function returns the maximum profit that can be obtained by buying on one day and selling on another day,
      considering only one transaction.
  
      >>> max_revenue([10, 7, 5, 8, 11, 9])
      6
      >>> max_revenue([100, 180, 260, 310, 40, 535, 695])
      655
      """
      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:     min_price = prices[0]
      max_profit = 0
      for price in prices:
          if price < min_price:
              min_price = price
          elif price - min_price > max_profit:
              max_profit = price - min_price
      return max_profit