This is much more readable than using str.format or the % formatting notation.
I assume the reason these older ways to format strings was to keep the library compatible with older python versions, however at the moment, this library supports >=3.6 which allows us to utilize these f-strings instead of the less readable methods.
Since python 3.6, support for "f-strings" was added, this allows us to format strings in a very simple way:
This is much more readable than using
str.format
or the%
formatting notation.I assume the reason these older ways to format strings was to keep the library compatible with older python versions, however at the moment, this library supports >=3.6 which allows us to utilize these f-strings instead of the less readable methods.