I have a list
values_list = [1013.0, 683.0, 336.0, 406.0, 636.0, 1065.0, 1160.0]
Also I have a value
value = 660.6153846153846
This list is based on the assumption that there are 3 stages. First stage should be higher that the value, second - lower, and third is again higher.
I want to split this list into three lists, saving the order of the values like this:
values_list = [[1013.0, 683.0], [336.0, 406.0, 636.0], [1065.0, 1160.0]]