What is the difference between `__str__` and `__repr__` methods in Python?
Answer / nashiinformaticssolutions
`__str__` is used for creating a user-friendly string representation of an object. `__repr__` is used for creating a detailed string representation of an object, intended for debugging.
| Is This Answer Correct ? | 0 Yes | 0 No |
What does pep8 refer to?
What is pydoc command?
What does head () do in python?
How can you profile a python script?
When does dictionary is used instead of a list in python?
What is linspace in python?
What is dynamic typing in python?
Is sorted in python?
Is python interpreted, or compiled, or both?
What is python enumerate?
How install pip python ubuntu?
Explain accessor and mutator methods in python?