A

Admin • 832.27K Points
Coach

Q. Which of the following is true about `__repr__()`?

  • (A) It is used for string conversion for developers
  • (B) It is used to compare two objects
  • (C) It is the destructor method
  • (D) It is the constructor method
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

`__repr__()` is meant to give an official string representation useful for debugging.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.