摘要: # 使用字符串的format()方法,对输出数据项进行格式化 x1, y1 =1.2, 3.57 x2, y2 =2.26, 8.7 # 输出1 print('{:-^40}'.format(x1, y1)) # {:-^40}控制输出数据格式:宽度占40列,居中对齐,空白处用-补齐 print(' 阅读全文
posted @ 2021-04-02 21:07 申富明 阅读(201) 评论(3) 推荐(0)