May I take it that this is what your question is referring to?
def remove_middle(lst, start, end):
return lst[:start] + lst[end:]
This will have no effect on the original list but is a new list constructed from the original. We can print it or assign it to a variable at the caller.
s = list('abcdefghijklmnopqrstuvwxyz')
list_without_middle = remove_middle(s, 7, 17)
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
It is important to note that when we pass a list object to a function, even though it be given a different local name, it is not a copy, but the global list, itself we are acting upon, Any change to the list in the function will be reflected in the global object.
Above we do not manipulate or modify the list in any way. We merely extracted the data points we wanted and returned them as a new object.