input: Write a function to calculate the dot product of two given lists. If the two lists are of different lengths, raise a ValueError.
  assert dot_product([1, 2], [3, 4]) == 11
  assert dot_product([], []) == 0
  assert dot_product([1, 1, 1], [1, 1, 1]) == 3
  assert dot_product([-1, 2, 3], [0, -2, -3]) == -13
  assert dot_product([1], [1]) == 1
output: def dot_product(list1, list2):
      if len(list1) != len(list2):
          raise ValueError("Lists must be of the same length")
      return sum(x * y for x, y in zip(list1, list2))