input: Write a function to calculate the dot product of two lists containing the same number of numerical elements. The function should take two lists as arguments and return the sum of the products of the corresponding elements in the two lists. If either of the lists is empty, the function should return 0.
  assert dot_product([1, 2], [3, 4])==11
  assert dot_product([0, 0], [1, 1])==0
  assert dot_product([1, 2, 3], [4, 5, 6])==32
  assert dot_product([], [])==0
  assert dot_product([1], [1])==1
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))