News

The traditional ways to do this in Python aren’t elegant. One is to write an if/elif/else chain of expressions ... In the above example we’re using simple strings as our match targets ...
We’ve long used f-strings in Python to conveniently format variables in a string. Python 3.14 introduces an even more advanced feature in this vein, template strings as defined in PEP 750.