input: Write a function to calculate the dot product of two given lists. The function should take two arguments in the form of two lists and return the dot product of the two arguments. If the given lists are of different lengths, return -1.
  assert dot_product([1, 2], [3, 4])==11
  assert dot_product([1, 2, 3], [4, 5, 6])==32
  assert dot_product([], [])==0
  assert dot_product([1, 2], [3])==-1
  assert dot_product([2, 3], [4, 5])==23
output: def dot_product(list1, list2):
      if len(list1) != len(list2):
          return -1
      return sum(x * y for x, y in zip(list1, list2))