Python-记事本

1.文本颜色

格式:033[显示方式;前景色;背景色m要打印的字符串033[0m

2.format 格式

print("燃烧卡路里:", format(KaLuLi,'.2f'))
print('{}的三次方为{:*^20}'.format(a,pow(a, 3)))
print("
{:^3.0f}%[{}->{}]{:.2f}s".format(c,a,b,dur),end='')

 3.input print

height, weight = eval(input())
print("BMI指标为:国际'{0}',国内'{1}'".format(who, nat))

4.


转载仅为学习,不会商用。
欢迎转载原创,附文链接。
原文地址:https://www.cnblogs.com/xdd1997/p/12045943.html