赞
踩
# 字符串格式化输出: 语法 f'{}' name = 'tom' age = 19 print('我的名字是%s,我的年龄是%d' % (name, age)) print(f'我的名字是{name},我的年龄是{age}') #这种方式更高效 print(f'我的名字是{name},我的年龄是{age},明年年龄是{age+1}') #这种方式更高效