input: Write a function to calculate the maximum, minimum, and average values from a given list of numbers. Return the values as a tuple.
  def calculate_metrics(list):
      maximum = max(list) if list else None
      minimum = min(list) if list else None
      average = sum(list) / len(list) if list else None
      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([])==(None, None, None)
  assert calculate_metrics([-1, -2, -3, -4, -5])==(-1, -5, -3.0)
  assert calculate_metrics([10])==(10, 10, 10.0)
output: def calculate_metrics(list):
      maximum = max(list) if list else None
      minimum = min(list) if list else None
      average = sum(list) / len(list) if list else None
      return maximum, minimum, average