input: Write a function that takes two arguments in the form of two lists and calculates the dot product of the two arguments. If the given lists are of different lengths, the function should return None.
  def dot_product(list1, list2):
      if len(list1) != len(list2):
          return None
      product = 0
      for i in range(len(list1)):
          product += (list1[i] * list2[i])
      return product
  
  # Test cases
  assert dot_product([1, 2], [3, 4]) == 11
  assert dot_product([1, 2, 3], [4, 5, 6]) == 32
  assert dot_product([1, 2], [3, 4, 5]) == None
  assert dot_product([], []) == 0
output: def dot_product(list1, list2):
      if len(list1) != len(list2):
          return None
      product = 0
      for i in range(len(list1)):
          product += (list1[i] * list2[i])
      return product