擅长:python、mysql、java
<p>您可以使用<a href="http://docs.python.org/library/collections.html#collections.deque" rel="nofollow">collections.deque</a>:</p>
<pre><code>from collections import deque
queue = deque()
queue.append(new) # append
current = queue.popleft() # first item
</code></pre>