f-strings 在字符串里加入表达式

168 阅读1分钟
>>> name = "yly"
>>> Education = "PhD"
>>> f"I'm {name}, and I'm a {Education}."
'I'm yly, and I'm a PhD.'