python 使用format()方法num = 5 print("{:.0%}".format(num/100))使用 f-string 需要python3.6以上版本num =5 print(f"{num/100:.0%}")