input: Write a function to calculate the maximum revenue from a list of prices. The function should determine the maximum difference between any two prices in the list, where the price at a later index is greater than the price at an earlier index. If the list is empty or contains only one price, the function should return 0.
  
  def max_revenue(prices):
      if len(prices) < 2:
          return 0
      max_diff = 0
      min_price = prices[0]
      for price in prices[1:]:
          if price - min_price > max_diff:
              max_diff = price - min_price
          if price < min_price:
              min_price = price
      return max_diff
  
  assert max_revenue([10, 7, 5, 8, 11, 9]) == 6
  assert max_revenue([4, 3, 2, 1]) == 0
  assert max_revenue([]) == 0
  assert max_revenue([100]) == 0
  assert max_revenue([3, 7, 2, 10, 4, 8]) == 8
output: def max_revenue(prices):
      if len(prices) < 2:
          return 0
      max_diff = 0
      min_price = prices[0]
      for price in prices[1:]:
          if price - min_price > max_diff:
              max_diff = price - min_price
          if price < min_price:
              min_price = price
      return max_diff