当前位置: 代码迷 >> 综合 >> Python—print(f “{}”) 的用法
  详细解决方案

Python—print(f “{}”) 的用法

热度:75   发布时间:2024-03-09 00:07:17.0
a=1
b=2
S=a+b
P=a*b
print(f"Sum of a and b is {S}, and product is {P}")

 >>>Sum of a and b is 3, and product is 2

  相关解决方案