Question: If a class has a method named _ _str_ _, which of these is a way to call the method? a. You call it like
If a class has a method named _ _str_ _, which of these is a way to call the method?
a. You call it like any other method: object._ _str_ _()
b. By passing an instance of the class to the built in str function
c. The method is automatically called when the object is created
d. By passing an instance of the class to the built-in state function
Step by Step Solution
3.33 Rating (150 Votes )
There are 3 Steps involved in it
The correct answer is b By passing an instance of the class to the builtin str function The str meth... View full answer
Get step-by-step solutions from verified subject matter experts
