python3 输出内容格式化
Posted 因为专注。所以专业
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python3 输出内容格式化相关的知识,希望对你有一定的参考价值。
# 格式化 print("hello ,%s you have $%d" % ("Jack", 10000)) print("%0.4f" % 3.1415926) print("北戴河房价环比上涨:%0.2f %%" % 2.87) score_1 = 72 score_2 = 85 r = (score_2 - score_1) / score_1 print("小明本学期同比上学期成绩提升: %0.1f %%" % r)
以上是关于python3 输出内容格式化的主要内容,如果未能解决你的问题,请参考以下文章
Python3.7入门之print格式化输出以及input输入
Python3.7入门之print格式化输出以及input输入