Let A And B Be Objects Of Class Foo Which Functions Are Called #1065
Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Classes and Objects - Python Operator Overloading - Quiz No.1.
Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?
__add__(), __str__()
__str__(), __add__()
__sum__(), __str__()
__str__(), __sum__()