Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes
asked in CSC201 Spring 2021 by (1 point)

2 Answers

+4 votes

I think it is more readable than the normal print method. In case of more variables in your string, it provides better readability. Multi-line string interpolation can be performed easily using this syntax.

answered by (1 point)
+2 votes

Also, it provides more options for formatting numbers, like ensuring that a money amount gets printed with 2 digits after the decimal: e.g. 347.20, instead of 347.2.

answered by (5.7k points)
...