Python f-string 格式化输出示例

입력:
Code
Result

这个例子演示 Python 的 f-string 格式化:在引号前加 f,大括号里写变量或表达式,还能用 .1f 控制小数位。适合配合字符串教程练习格式化输出。