Unless I'm missing something, the only way to tell if a deque is empty is to try and pop() something and catch the resulting IndexError.
確定! 回上一頁