input: Write a function to calculate the maximum, minimum, and average values from a given sequence of numbers. The function should return these three values in the order: maximum, minimum, and average. If the given sequence is empty, the function should return (0, 0, 0).
  def calculate_metrics(list):
      if not list:
          return 0, 0, 0
      maximum = max(list)
      minimum = min(list)
      average = sum(list) / len(list)
      return maximum, minimum, average
  
  assert calculate_metrics([3, 4, 5, 6, 21, 8])==(21, 3, 8.166666666666666)
  assert calculate_metrics([1, 2, 3, 4, 5])==(5, 1, 3.0)
  assert calculate_metrics([-10, 0, 10])==(10, -10, 0.0)
  assert calculate_metrics([])==(0, 0, 0)
  assert calculate_metrics([-2, -7, -4, -1, -3])==(-1, -7, -3.4)
output: def calculate_metrics(list):
      if not list:
          return 0, 0, 0
      maximum = max(list)
      minimum = min(list)
      average = sum(list) / len(list)
      return maximum, minimum, average