AI备忘录 - Python - 数字字符串前自动补0位 的评论
type: channel
link: https://www.aiuai.cn/aifarm1749.html
description: 应用场景：如，'123' -> '00123'；'-123' -> '-00123'num = 123num_str = '%05d' % numassert num_str == ...