Python中最简单快捷的输出方式
作者:互联网
格式化输出最简单的方式之哑巴填充公式
name=ludundun
age=25
print(f'hello {name},your age is {age}')
输出内容:
hello ludundun,your age is 25
Sally=6.66666666
print(f'your Sally is {Sally:.3f}')
精确获取小数点后三位进行结果输出。
输出内容:
your Sally is 6.667
标签:输出,25,Python,age,ludundun,快捷,Sally,your 来源: https://www.cnblogs.com/ludundun/p/11260599.html