What are the differences among %s, %r and %d in Python?

From the python documentation,

%s : String (converts any Python object using str()).
%r : String (converts any Python object using repr()).
%d : Signed integer decimal.

No comments:

Post a Comment