Python String Interpolation
Python string interpolation is available via few of interfaces, as Chris at Hashrocket taught me.
Today I learned about formatted string literals, more commonly known as f-strings.
>>> animals = 'cats'
>>> print(f'My house is full of {animals}.')
My house is full of cats.
They’re my preferred technique because they’re similar to the interpolation syntax I’ve come to know in JavaScript, Ruby, and Elixir.