Hello, you’re doing a great service by helping other newbies. I am also a newbie.
I ran this code:
def remove_middle(lst, start, end): return lst[:start] + lst[end:]
but I got
[4, 16, 23, 42].
I see you explain the streamlined version as
def remove_middle(lst, start, end): return lst[:start] + lst[end+1:]
I understand that you’re right, this is the correct answer, however, I do not understand the practical application of
lst[end +1:]. Can you please explain that portion of your code again?