f-string
By Sitraka Forler · Lecturer, Durham Business SchoolUpdated 13 September 2026 About this site
String with embedded expressions: f"value is {variable}".
F-strings (formatted string literals) let you embed Python expressions inside strings using curly braces. They are faster and more readable than `.format()` or `%` formatting.
Example
price = 174.55
print(f"AAPL costs ${price:.2f}")