human
Write a function that takes in a list of tuples and returns a list containing the rear element of each tuple. Here is a solution in Python:
Write me a the Python code you requested?
assistant
#Here is the Python code you requested.
 def rear_extract(test_list):
  res = [lis[-1] for lis in test_list]
  return (res)