input: Write a function to calculate the maximum revenue by determining the highest possible sum of differences between consecutive elements in a given list of prices. If the list is empty or contains only one price, return 0.
  assert max_revenue([10, 7, 5, 8, 11, 9])==6
  assert max_revenue([1, 2, 3, 4, 5])==4
  assert max_revenue([100])==0
  assert max_revenue([])==0
  assert max_revenue([9, 8, 7, 6, 5, 4])==0
output: def max_revenue(prices):
      if len(prices) < 2:
          return 0
      max_profit = 0
      min_price = prices[0]
      for price in prices[1:]:
          if price < min_price:
              min_price = price
          else:
              max_profit = max(max_profit, price - min_price)
      return max_profit