Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?
(a) __add__(), __str__()
(b) __str__(), __add__()
(c) __sum__(), __str__()
(d) __str__(), __sum__()
I got this question in an interview.
My question is from Operator Overloading in portion Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python