I want to iterate a list of non-repeating numbers in "increasing resolution" (sorry, don't know the name or exactly how to call this). I will pose an example, suppose the list of numbers `[1,2,3,4,5,6,7,8,9]`. I want to iterate this list in the following way `[1,9,5,3,7,2,4,6,8]`. The criterion is as follows: in each iteration select the list elements that are (approximately) halfway from the previously selected elements, and append those to the list. Maybe the following scheme helps:

[![enter image description here](https://i.stack.imgur.com/i177k.png)](https://i.stack.imgur.com/i177k.png)

In the zeroth iteration always select those in the extremes. Then the first iteration selects the element in the middle. In the next iteration two elements are picked, those in the middle of the previously selected. And so on. In this way, each iteration increases the resolution in some sense (thinking of this as an image for example).

How is this iteration criterion/algorithm called? Is there a function in Python that already does this for a list of numbers?