Variable/Formatters in Python

Having completed up to Ex10 in Learning Python the Hard Way, I’m still a bit stuck on one variable/formatter i.e. %r.
I’ve read the explanations that %r is used in debugging and that it basically represents the “raw programmer’s version of the variable.” For me this isn’t quite as clear as the difference between say %s and %d, i.e. one would be a variable where letters or terms/words would follow and %d would be followed by an integer/number. That was much clearer than the explanation of %r. I haven’t come across an example yet that has lit the proverbial light bulb yet. Could someone provide an example differentiating say %s from %r?

Hello @JimmyD

I also wanted to know.
Found this on Stackoverflow:

Use the %r for debugging, since it displays the “raw” data of the variable, but the others are used for displaying to users.

Perhaps this is even better:

I think I answered you offline but I’ll add it here:

It is the “representational print” or you can say “raw print” formatting. It prints out what Python thinks the variable should be. Just use it for debugging. There’s not many other times you use it.

Correct. You did answer it offline. There was another person who had the same question and I was replying to the user to let them know. Again, many thanks for being so responsive. It is greatly appreciated.