def remove_section(alist, start, end):
"""
Return a copy of alist removing the section from start to end inclusive
>>> inlist = [8,7,6,5,4,3,2,1]
>>> remove_section(inlist, 2, 5)
[8, 7, 2, 1]
>>> inlist == [8,7,6,5,4,3,2,1]
True
>>> inlist = ["bob","sue","jim","mary","tony"]
>>> remove_section(inlist, 0,1)
['jim', 'mary', 'tony']
>>> inlist == ["bob","sue","jim","mary","tony"]
True
"""
I’m a bit stumped as to how to go about doing this any help would be much appreciated.
This should do what you want: