Examveda

Which function is called when the following Python code is executed?
f = foo()
format(f)

A. format()

B. __format__()

C. str()

D. __str__()

Answer: Option D


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

Join The Discussion

Related Questions on Classes and Objects in Python