input: def max_revenue(prices):
      """Calculate the maximum revenue by identifying the maximum difference 
      between any two prices in the given list where the second price is after 
      the first.
  
      >>> max_revenue([10, 7, 5, 8, 11, 9])
      6
      """
output:     max_diff = 0
      min_price = prices[0]
      
      for price in prices[1:]:
          if price < min_price:
              min_price = price
          else:
              max_diff = max(max_diff, price - min_price)
      
      return max_diff