📜  python栈数据结构——Python代码示例

📅  最后修改于: 2022-03-11 14:45:43.247000             🧑  作者: Mango

代码示例1
>>> from collections import deque
>>> myStack = deque()
>>> myStack.append('a')
>>> myStack.append('b')
>>> myStack.append('c')
>>> myStack
deque(['a', 'b', 'c'])
>>> myStack.pop()
'c'
>>> myStack
deque(['a', 'b'])