Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. a = [5, 10, 15, 20, 25]
  2.  
  3. def firstlast(list):
  4. newlist = []
  5. newlist.append(a[0])
  6. newlist.append(a[len(a)-1])
  7. return newlist
  8.  
  9. print(firstlast(a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement