input: Write a function to calculate the maximum revenue from a given list of prices. The maximum revenue can be obtained by finding the maximum difference between any two prices where the second price is higher than the first price.
  
  def max_revenue(prices):
      max_profit = 0
      min_price = prices[0]
      for price in prices:
          min_price = min(min_price, price)
          profit = price - min_price
          max_profit = max(max_profit, profit)
      return max_profit
  
  assert max_revenue([10, 7, 5, 8, 11, 9]) == 6
  assert max_revenue([100, 180, 260, 310, 40, 535, 695]) == 655
  assert max_revenue([7, 1, 5, 3, 6, 4]) == 5
  assert max_revenue([7, 6, 4, 3, 1]) == 0
  assert max_revenue([]) == 0
output: def max_revenue(prices):
      if not prices:
          return 0
      max_profit = 0
      min_price = prices[0]
      for price in prices:
          min_price = min(min_price, price)
          profit = price - min_price
          max_profit = max(max_profit, profit)
      return max_profit