发布时间:2019-09-07 08:06:06编辑:auto阅读(2393)
使用 pprint 模块
pprint 模块( pretty printer )
用于打印 Python 数据结构. 当你在命令行下打印特定数据结构时你会发现它很有用(输出格式比较整齐, 便于阅读).
import pprint
data = (
"this is a string", [1, 2, 3, 4], ("more tuples",
1.0, 2.3, 4.5), "this is yet another string"
)
pprint.pprint(data)
上一篇: Python海量数据处理之_Hadoop
下一篇: python 与ADB shell交互
50993
50376
40991
37858
32324
29215
28097
22927
22896
21223
1088°
1779°
1450°
1387°
1662°
1471°
2128°
3686°
3623°
2545°