首先是fstring的结构
f ' <text> { <expression> <optional !s, !r, or !a> <optional : format specifier> } <text> ... '
'!s'在表达式上调用str(),'!r'调用表达式上的repr(),'!a'调用表达式上的ascii()。
语法上是这样定义的:
If a conversion is specified, the result of evaluating the expression is converted before formatting. Conversion '!s'
calls str()
on the result, '!r'
calls