Python repr() function
Published February 16, 2022A repr() method is a Python built-in function that returns a string representation of an object. With repr(), a Python object can be represented as a printable representation.
Syntax
The following is the syntax of the repr(object):
repr(object) |
where Object: is the object whose printable representation can be displayed.
Example
x = 'My Python' |
Output
'My Python' |
Article Contributed By :
|
|
|
|
235 Views |