摘要: python3.6后加入了更加简洁的变量替换方式,f放在字符串外面,字符内加了大括号的变量会直接用变量值替换 f"{},{}" 程序如下 name = 'Guido' n = 37 print(f"{name} has {n} messages.") Guido has 37 messages. 阅读全文
posted @ 2025-06-16 17:00 金一九 阅读(20) 评论(0) 推荐(0)