You can use a List with: - pop() to remove from the tail - append(x) to add to the tail - pop(0) to remove from the head - insert(0, x) to add to the head
Looks like the code we inherited from MicroPython has it but it's disabled. The config for it is MICROPY_PY_COLLECTIONS_DEQUE and it's only enabled in the unix port.