input: Write a function to calculate the dot product of two given lists of the same length. If the two lists are empty, return 0.
  assert dot_product([1, 2], [3, 4])==11
  assert dot_product([], [])==0
  assert dot_product([1, 0], [0, 1])==0
  assert dot_product([2, 3, 4], [1, 2, 3])==20
output: def dot_product(list1, list2):
      if not list1:
          return 0
      return sum(x * y for x, y in zip(list1, list2))