它是在 Python3.6 新加的字符串格式化方法,这种方法是在字符串前面加上 "f",大括号直接使用变量,所以又叫 'f-strings'。
https://docs.python.org/3/reference/lexical_analysis.html#f-strings
它是在 Python3.6 新加的字符串格式化方法,这种方法是在字符串前面加上 "f",大括号直接使用变量,所以又叫 'f-strings'。
https://docs.python.org/3/reference/lexical_analysis.html#f-strings