input: Write a function to find a pair of numbers from a given list that add up to a given target. The function should return a list containing the pair if such a pair exists, otherwise 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) == [2, 6]
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 5) == [1, 4]
  assert find_pair([10, 20, 30, 40], 60) == [20, 40]
  assert find_pair([1, 3, 5, 7], 10) == None
  assert find_pair([], 5) == 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