摘要: 数字前面补0 字符型: print('23'.zfill(5)) 数字型: print('%011d' % 124) 日期与str互转: datetime 转 str str_date = datetime.now().strftime("%Y-%m-%d") (%04d%02d%02d)此种格式化 阅读全文
posted @ 2019-01-08 16:39 追星骑士 阅读(233) 评论(0) 推荐(0) 编辑