Examveda

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__()

Answer: Option A


This Question Belongs to Python Program >> Classes And Objects In Python

Join The Discussion

Related Questions on Classes and Objects in Python