Thursday, May 15, 2014

SOLUTION Exercise 12: List Ends

Exercise

Write a program that takes a list of numbers (for example, a = [5, 10, 15, 20, 25]) and makes a new list of only the first and last elements of the given list. For practice, write this code inside a function.

Sample solution

No comments:

Post a Comment