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 |
BY Best Interview Question ON 24 Jul 2019