human
Can you provide a the Python code you requested given the following:
Write a function that takes in two tuples and subtracts the elements of the first tuple by the elements of the second tuple with the same index. Here is a solution in Python:
assistant
#Here is the Python code you requested.
 def substract_elements(test_tup1, test_tup2):
  res = tuple(map(lambda i, j: i - j, test_tup1, test_tup2))
  return (res)