Question: Bookend List Create a function bookend _ list that consumes a list of integers as a parameter and returns the first and last elements as
Bookend List
Create a function bookendlist that consumes a list of integers as a parameter and returns the first and last elements as a new list. If the original list is empty, return an empty list instead. Unit test this function sufficiently.
To give the type parameter of a list of integers, use int
write the entire code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
