摘要: ``` >>> def esc(code): ... return f'\033[{code}m' ... >>> print(esc('31;1;4') + 'really' + esc(0) + ' important') ``` 阅读全文
posted @ 2019-08-16 14:34 公众号python学习开发 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 安装 示例代码 阅读全文
posted @ 2019-08-16 14:28 公众号python学习开发 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 优化之后 阅读全文
posted @ 2019-08-16 14:27 公众号python学习开发 阅读(739) 评论(0) 推荐(0) 编辑
摘要: 通过设置dumps的indent参数,能够实现pprint打印的效果。让结构格式更加好看。 阅读全文
posted @ 2019-08-16 14:21 公众号python学习开发 阅读(461) 评论(0) 推荐(0) 编辑