input: Write a function to calculate the dot product of two lists. The function should take two lists as input and return the sum of the products of corresponding elements. If the given lists are empty or have different lengths throw Value Error.
  
  assert dot_product([1,2], [3,4])==11
  assert dot_product([1,2,3], [4,5,6])==32
  assert dot_product([0,0,0], [1,2,3])==0
  assert dot_product([], []) #Raises ValueError
  assert dot_product([1,2], [3,4,5]) #Raises ValueError
output: def dot_product(list1, list2):
      if not list1 or not list2 or len(list1) != len(list2):
          raise ValueError
      return sum(x * y for x, y in zip(list1, list2))