All we have to do is create a tuple with three elements. The first element of the tuple is the first element of the list, which can be found using my_list[0].
The second element of the tuple is the last element in the list. my_list[len(my_list) - 1] or simply my_list[-1] will give us this element. We could also have used the pop() method, but that would alter the list.
We already know how to calculate the length of a data structure, so finding out the third element of the tuple is pretty easy.