In Python, _____ is a special method used to overload the ‘+’ operator for custom objects.

  • add
  • overload
  • plus
  • sum
In Python, the __add__ method is used to overload the + operator for custom objects. This allows you to define custom behavior when two objects of your class are added together using the + operator.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *