def __fill_right(self):
    x = len(self.left) // 2
self.right.extend(self.left[0:x])
self.right.reverse()
del self.left[0:x]

def __fill_left(self):
    x = len(self.right) // 2
self.left.extend(self.right[0:x])
self.left.reverse()
del self.right[0:x]
O(1) indexable deque of integers in Python