Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 333 Bytes

File metadata and controls

9 lines (7 loc) · 333 Bytes

List Ends

Problem:

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.

Concepts to practice

  • Lists and properties of lists
  • List comprehensions (maybe)
  • Functions