input: from typing import List
  
  def max_revenue(prices: List[int]) -> int:
      """ Calculate the maximum revenue that can be obtained from a list of prices.
      The function assumes that the prices are given in chronological order and that
      the revenue is calculated by finding the maximum sum of contiguous positive
      differences between consecutive prices.
      >>> max_revenue([10, 7, 5, 8, 11, 9])
      6
      >>> max_revenue([10, 20, 30, 40, 50])
      40
      """
output:     max_rev = 0
      for i in range(1, len(prices)):
          if prices[i] > prices[i - 1]:
              max_rev += prices[i] - prices[i - 1]
      return max_rev