wosat@lemmy.worldtoPython@programming.dev•Clearing The Deque (exploring Python's deque data structure through a picture story)English
5·
1 year agoYou can use a deque as a stack (First In, Last Out) or as a queue (First In, First Out). Lists are especially inefficient when adding/removing from the beginning of the list, but, for deques, it’s a O(1) operation.
In what I’m sure is totally unrelated news, South Korea’s work force is predicted to shrink by half in the next 50 years.