Python-记事本
1.文本颜色
格式:\033[显示方式;前景色;背景色m要打印的字符串\033[0m
2.format 格式
print("燃烧卡路里:", format(KaLuLi,'.2f'))
print('{}的三次方为{:*^20}'.format(a,pow(a, 3)))
print("\r{:^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.
本文来自博客园,作者:xdd1997
转载请注明:https://www.cnblogs.com/xdd1997/p/12045943.html