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

  • (A) __str__
  • (B) __repr__
  • (C) __init__
  • (D) __name__
πŸ’¬ Discuss
βœ… Correct Answer: (A) __str__
Explanation: `__str__` defines the human-readable string representation of the object.
Explanation by: Mr. Dubey
`__str__` defines the human-readable string representation of the object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
77
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate