摘要: format的用法 print("{:-^20}".format(pow(78,3))) :定义格式 ^:据中对齐,不足的用前面的额符号的额填充 20:占据20位 print('{:10s} and {:>10s}'.format('hello','world')) # 取10位左对齐,取10位右对 阅读全文
posted @ 2020-09-15 20:34 小杨的冥想课 阅读(254) 评论(0) 推荐(0) 编辑