πŸ“Š Python
Q. Which method is automatically called when an object is converted to a string using str()?
  • (A) __str__()
  • (B) __init__()
  • (C) __call__()
  • (D) __repr__()
πŸ’¬ Discuss
βœ… Correct Answer: (A) __str__()

Explanation: The __str__() method is used to define the string representation of an object.

Explanation by: Mr. Dubey
The __str__() method is used to define the string representation of an object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
83
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate