You are here : python_3Built-in Functionsrepr

repr() - Built-in Functions

Return a string containing a printable representation of an object.  For many
types, this function makes an attempt to return a string that would yield an
object with the same value when passed to eval(), otherwise the
representation is a string enclosed in angle brackets that contains the name
of the type of the object together with additional information often
including the name and address of the object.  A class can control what this
function returns for its instances by defining a __repr__() method.


Syntax

repr(object)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference