def dma_workaround(l): r = [] it = iter(l) while True: try: r += reversed([next(it) for i in range(8)]) except StopIteration: return r