πŸ“Š Python
Q. Which method is used to override the default behavior of the + operator?
  • (A) __add__()
  • (B) __plus__()
  • (C) __sum__()
  • (D) __combine__()
πŸ’¬ Discuss
βœ… Correct Answer: (A) __add__()

Explanation: __add__() is used to override the + operator in a class.

Explanation by: Mr. Dubey
__add__() is used to override the + operator in a class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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