fstring
fstring, also known as formatted string literals, is a feature introduced in Python 3.6 that provides a more concise and readable way to embed expressions inside string literals. The syntax involves prefixing a string with the letter 'f' or 'F', followed by curly braces {} which contain Python expressions. These expressions are evaluated at runtime and their string representation is inserted directly into the string.
Prior to fstrings, developers often used the .format() method or the % operator for string formatting. While
Fstrings can also include more complex expressions, such as function calls or arithmetic operations, within the