input: Write a function to calculate the element-wise product of two matrices A and B, resulting in a matrix C, where each element of C is the product of the corresponding elements of A and B. If the matrices do not have the same dimensions, return an error message. Return the resulting matrix C if the dimensions are compatible.
  assert elementwiseProduct([[3, 4], [1, 2]], [[7, 5], [0, 1]])==[[21, 20], [0, 2]]
  assert elementwiseProduct([[3, 4]], [[7, 5]])==[[21, 20]]
  assert elementwiseProduct([[3, 4], [1, 2]], [[3, 2]])=="Matrices do not have the same dimensions"
  assert elementwiseProduct([], [])==[]
output: def elementwiseProduct(A, B):
      if len(A) != len(B) or any(len(rowA) != len(rowB) for rowA, rowB in zip(A, B)):
          return "Matrices do not have the same dimensions"
      return [[A[i][j] * B[i][j] for j in range(len(A[0]))] for i in range(len(A))]