about | help | code help+videos | done | prefs |
Write a function called middle that takes a list and returns a new list that contains all but the first and last elements. For example: >>> t = [1, 2, 3, 4] >>> middle(t) [2, 3] middle([1, 2, 3, 4]) → [2, 3] middle([1, 2]) → [] middle([1]) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 103 Post-solution available
Copyright Nick Parlante 2017 - privacy