> For the complete documentation index, see [llms.txt](https://r24zeng.gitbook.io/leetcode-notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://r24zeng.gitbook.io/leetcode-notebook/useful-knowledge-about-python/queue-he-stack-ru-he-yong-python-shi-xian.md).

# queue 和 stack如何用python实现

### queue

```python
queue = []
queue.append()
queue.pop(0)
```

### stack

```python
stack = []
stack.append()
stack.pop()
```

list.pop() 可以返回pop的值
