Five wonderful uses of ‘f- Strings’ in Python
Published in
4 min readJan 25, 2021
Before PEP 498 was introduced, Python had primarily three ways of formatting strings i.e. the %-formatting
, str.format
and the string.Template
. In 2015, Eric V. Smith proposed a new string formatting mechanism known as Literal String Interpolation, which provided a simpler and effective way for formatting strings. These strings are referred to as formatted string literal or f-strings as they are prefixed with…