当前位置:主页 > 软件编程 > Python代码 >
时间:2021-04-29 10:58:23 | 栏目:Python代码 | 点击:次
需要先安装 tabulate 模块:
pip3 install tabulate
以上是把一维的dict打印出来.
再看看二维的,list-of-dict
(注:此处project函数是funcy包中的一个功能)
output:
漂亮!
(另外, 之前也用过 PrettyTable ,但是感觉没有tabulate简单上手)