What is an f-string and why is it better than format?
Answer
•f-string is faster and more readable.
•Supports expressions inside {}.
•Convenient for formatting numbers/dates.
•Easier to maintain than concatenation.
•format is useful when template is stored separately.
Was this answer helpful?