f-strings with variable in format specifier

前端 未结 0 1400
自闭症患者
自闭症患者 2020-12-09 17:25

Can you create a f-string where you use a integer variable for the digits of padding?

>>> s = 8
>>> f"{\'test\':s}"
相关标签:
回答
  • 消灭零回复
提交回复
热议问题