input: Write a function to take two lists as input and return a new list containing only the common elements. If either of the input lists is empty, return an empty list.
  assert common_elements([1, 2, 3, 4, 8], [2, 6, 8, 10])==[2, 8]
  assert common_elements([1, 2, 3], [4, 5, 6])==[]
  assert common_elements([1, 2, 3], [1, 2, 3])==[1, 2, 3]
  assert common_elements([], [2, 6, 8, 10])==[]
  assert common_elements([1, 2, 3], [])==[]
output: def common_elements(list1, list2):
      if not list1 or not list2:
          return []
      return list(set(list1) & set(list2))