python repr in function code example
Example 1: __repr__ in python
def __repr__(self) -> str:
return
Example 2: repr() in python
#The repr() function returns a printable representation of the given object.
#repr() takes a single object.
#Syntax
val = "string"
print(repr(val)) #output ---->"'string'"