i have written a function that produces a tuple of two lists from one list. one list contains the second, fourth and fifth values and the other list contains all the remaining values. i also have a condition that if reverse=True the values of the lists will be reversed when returned.
def seperate(x, reverse=False):
xs = []
ys = []
for i in range(0, len(x), 2):
xs.append(x[i])
ys.append(x[i + 1])
return (xs, ys)
if reverse is True:
x = xs.reverse()
y = ys.reverse()
return(x, y)
for some reason when reverse is True the lists are not being reversed, they are the same as when reverse is False