Which function is called when the following Python program is executed? f = foo() format(f)Questions & Answers › Category: Programming Language › Which function is called when the following Python program is executed? f = foo() format(f) -1 Vote Up Vote Down Geek Boy Staff asked 4 years ago Which function is called when the following Python program is executed?f = foo() format(f)a. str(. b. format(. c. __str__(. d. __format__(.Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...1 Answers -1 Vote Up Vote Down Geek Boy Staff answered 4 years ago c. __str__(. Explanation: Both str(f) and format(f) call f.__str__().Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...