I have following lines
{value!r}".format(value=value)
%(access_token)r % value
What does r
and !
mean here?
It's a conversion operation. It converts value
to a string using repr()
Check out "Explicit Conversion Flag" in https://www.python.org/dev/peps/pep-3101/ for more info.
r
means print the repr()
of the object. !
is what allows it to work in format strings.