Vidyalelo
Python · Q53

Classes and Objects in Python

Programming · Python · question 53

Q53

Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?

A.
__add__(), __str__()
Answer
B.
__str__(), __add__()
C.
__sum__(), __str__()
D.
__str__(), __sum__()

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board