> For the complete documentation index, see [llms.txt](https://stb11816.gitbook.io/python_note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stb11816.gitbook.io/python_note/web/prettytable.md).

# prettytable

```python
from prettytable import PrettyTable

table = PrettyTable(['id', 'ip'])
table.add_row(['1', '172.16.0.1'])
print(table)
```

記得先pip install

<https://linuxops.org/blog/python/prettytable.html>
