In which Python version were f-strings (formatted string literals) introduced?
Correct answer A. Python 3.6
Explanation
Formatted string literals, written with an f prefix such as f"{name}", were added in Python 3.6 by PEP 498. Python 3.8 later added the = specifier for self-documenting expressions, which is why 3.8 is a tempting choice. Older code uses str.format() or the % operator.
Answer checked How we write and check questions
Discussion