0 out of 464 challenges solved
Write a function `add_lists` that takes two arguments: 1. `test_list`: A list of elements. 2. `test_tup`: A tuple of elements. The function should return a new tuple that contains all the elements of `test_tup` followed by all the elements of `test_list`. #### Example Usage ```python [main.nopy] add_lists([5, 6, 7], (9, 10)) # Expected output: (9, 10, 5, 6, 7) add_lists([6, 7, 8], (10, 11)) # Expected output: (10, 11, 6, 7, 8) add_lists([7, 8, 9], (11, 12)) # Expected output: (11, 12, 7, 8, 9) ```
def add_lists(test_list, test_tup): """ Append the elements of test_list to test_tup and return the resulting tuple. Args: test_list (list): The list of elements to append. test_tup (tuple): The tuple to which elements will be appended. Returns: tuple: A new tuple containing elements of test_tup followed by elements of test_list. """ # Combine the tuple and list into a new tuple pass # Replace this with your implementation