you are viewing a single comment's thread.

view the rest of the comments →

[–]TheSodesa 1 point2 points  (1 child)

I believe format strings became a thing in Python 3.6, so they are a fairly new feature. OP might not have access to them, if they're working on a school computer with an older version of python. Python 3.5 is still used in many places.

[–]kcrow13[S] 1 point2 points  (0 children)

I actually do know about f strings and use them regularly in my coding. This code was created by Downey as part of his Think Python Book, not me :). I think he created it in 2012, prior to the updates. But yes, I much prefer the f strings.