id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

chanr@sfusd.edu > chop
prev  |  next  |  chance

Write a function called chop that takes a list, modifies it by removing the first and last elements, and returns None. For example: >>> t = [1, 2, 3, 4] >>> chop(t) >>> t [2, 3]


chop([1, 2, 3, 4]) → [2, 3]
chop([1, 2, 3, 4]) → [2, 3]
chop([1, 2, 3, 4, 5]) → [2, 3, 4]

...Save, Compile, Run (ctrl-enter)

def chop(t):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 104 Post-solution available

Copyright Nick Parlante 2017 - privacy