input: Write a function to create a list containing the smallest and greatest values from a given array of numbers. The function should return the list in the order [smallest value, greatest value]. If the given array is empty, the function should return an empty list.
  
  assert min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  assert min_max([5, -3, 12, 0])==[-3, 12]
  assert min_max([7])==[7, 7]
  assert min_max([])==[]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]