make_ends¶
Given a list of ints, return a new list length 2 containing the first and last elements from the original list. The original list will be length 1 or more.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.