input: Write a function to calculate the dot product of two given lists. The function should take two arguments, both lists of equal length, and return the dot product as an integer. If the provided lists are empty, the function should return 0.
  assert dot_product([1, 2], [3, 4]) == 11
  assert dot_product([0, 0], [0, 0]) == 0
  assert dot_product([-1, 1], [1, -1]) == -2
  assert dot_product([], []) == 0
  assert dot_product([4, 5], [2, 3]) == 23
output: def dot_product(list1, list2):
      if not list1 or not list2:
          return 0
      return sum(x * y for x, y in zip(list1, list2))