原文链接:https://mp.weixin.qq.com/s?__biz=MzUyOTAwMzI4NA==&mid=2247489265&idx=3&sn=01d4c4b4ef540b8d104b8f1f4e0219bb&chksm=fa66f08acd11799cd938fdc24fedd49b20b76b5d6c11f68c5a6a6d1b3a3d92aead083b4f818a&mpshare=1&scene=24&srcid=&sharer_sharetime=1591186359953&sharer_shareid=b45689476c673cb095d9afc67051823e&key=c92d40cae09076cfb76d8413f771cd6bed9b9aacdc0b2e7ccb40065dd13107b82b5fc421458d78ff4be3ebb5994f5f9b7d4ac01ecc75cbd6a9ace4efc19b10ea356f818538793724948e2e42e3fe5991&ascene=14&uin=NDYyODk2ODM1&devicetype=Windows+8.1+x64&version=6209007b&lang=zh_CN&exportkey=A%2FTat27p%2FgQjZ%2BycQDxXlhU%3D&pass_ticket=56E%2FWRLKoEnulVDqfKaY%2FK%2BNfUo1QHRJOUVyG3tPIfCvy9IscFLIJj9KLC8%2F4lb3
它是在 Python3.6 新加的字符串格式化方法,这种方法是在字符串前面加上 "f",大括号直接使用变量,所以又叫 'f-strings'。
https://docs.python.org/3/reference/lexical_analysis.html#f-strings