学习笔记(26):Python 面试100讲(基于Python3.x)-使用fstring方式格式化字符串

立即学习:https://edu.csdn.net/course/play/26755/340140?utm_source=blogtoedu

fstring方式格式化字符串

s = f“我是{name},我今年{age}岁”

{}里可以是变量、函数或者类的成员

发布了25 篇原创文章 · 获赞 0 · 访问量 104

猜你喜欢

转载自blog.csdn.net/wuchuang19/article/details/104245126