0 out of 464 challenges solved
Write a function `rear_extract` that takes a list of tuples as input and returns a list containing the last element of each tuple. #### Example Usage ```python [main.nopy] print(rear_extract([(1, 'Rash', 21), (2, 'Varsha', 20), (3, 'Kil', 19)])) # Output: [21, 20, 19] print(rear_extract([(1, 'Sai', 36), (2, 'Ayesha', 25), (3, 'Salman', 45)])) # Output: [36, 25, 45] print(rear_extract([(1, 'Sudeep', 14), (2, 'Vandana', 36), (3, 'Dawood', 56)])) # Output: [14, 36, 56] ```
def rear_extract(tuples_list): """ Extract the last element from each tuple in the list. Args: tuples_list (list of tuples): A list containing tuples. Returns: list: A list containing the last element of each tuple. """ # Placeholder for the solution pass