python3: slice assignment faster than insert (beat 100% and 100%)
Reference: Why is slice assignment faster than list.insert?\n\n\nclass FrontMiddleBackQueue:\n\n    def __init__(self):\n        self.deque = []\n\n    def push
Reference: [Why is slice assignment faster than list.insert?](https://stackoverflow.com/questions/12537716/why-is-slice-assignment-faster-than-list-insert)\n\n```\nclass FrontMiddleBackQueue:\n\n    def __init__(self):\n        self.deque = []\n\n    def pushFront(self, val: int) -> None:\n        self.deque[0:0] = [val]\n\n    def pushMiddle(self, val: int) -> None:\n        mid = len(self.deque)//2\n        self.deque[mid:mid] = [val]\n\n    def pushBack(self, val: int) -> None:\n        self.deque.append(val)\n\n    def popFront(self) -> int:\n        if not self.deque:\n            return -1\n        res = self.deque[0]\n        self.deque[0:1] = []\n        return res\n\n    def popMiddle(self) -> int:\n        if not self.deque:\n            return -1\n        mid = (len(self.deque) - 1)//2\n        res = self.deque[mid]\n        self.deque[mid:mid+1] = []\n        return res\n\n    def popBack(self) -> int:\n        return self.deque.pop() if self.deque else -1\n```
['Python3']