input: Write a function to find a pair of numbers in the given list that add up to the target number. If such a pair exists, return the pair as a list. If no such pair exists, return None.
  def find_pair(lst, target):
      for i in range(len(lst)):
          if (target - lst[i]) in lst[i+1:]:
              return [lst[i], target-lst[i]]
      return None
  
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 8) == [4, 4]
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 10) == [4, 6]
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 15) == None
  assert find_pair([], 8) == None
  assert find_pair([1], 1) == None
output: def find_pair(lst, target):
      for i in range(len(lst)):
          if (target - lst[i]) in lst[i+1:]:
              return [lst[i], target-lst[i]]
      return None