M

Mr. Dubey • 100.28K Points
Coach

Q. Which method is used to define string conversion of an object?

  • (A) __str__
  • (B) __repr__
  • (C) __init__
  • (D) __name__
  • Correct Answer - Option(A)
  • Views: 27
  • Filed under category Python

Explanation by: Mr. Dubey
`__str__` defines the human-readable string representation of the object.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics