R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does the `__repr__` method do?

  • (A) Returns a user-friendly string representation
  • (B) Returns an official string representation for debugging
  • (C) Initializes the object
  • (D) Deletes the object
  • Correct Answer - Option(B)
  • Views: 13
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma
`__repr__` is meant to return an unambiguous string for debugging.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.