input: Write a python function to compute the Cartesian product of two lists.
  assert cartesian_product([1, 2, 3], [4, 5]) == [[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]]
  assert cartesian_product(['a', 'b'], [1, 2, 3]) == [['a', 1], ['a', 2], ['a', 3], ['b', 1], ['b', 2], ['b', 3]]
  assert cartesian_product([], [1, 2, 3]) == []
  assert cartesian_product([1, 2, 3], []) == []
output: def cartesian_product(list1, list2):
      return [[x, y] for x in list1 for y in list2]