repr()

Built-in FunctionPython 2.0+Intermediate

Returns a developer-friendly string representation of an object

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
print(repr("hello"))
print(repr(42))
print(repr([1, 2, 3]))

repr() is a built-in function that returns a developer-friendly string representation of an object.

Try in Playground

Tags

builtinfunctioncorestringdebuggingintrospection

Related Items