What is the difference between repr and str in Python?
Repr() | Str() |
---|---|
It is unambiguous | It is readable |
It can be implemented for any class | Implement in case of the string version |
Used to compute official | Used to compute informally |
It displays object | Displays string representations |
Suggest An Answer
No suggestions Available!