Explanation:Execute in shell to verify. 4. If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.(multiple answers allowed)
A. obj.__str__()
B. str(obj)
C. print obj
D. __str__(obj)
Answer:A
Explanation:Execute in shell to verify. 4. If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.(multiple answers allowed)
A. obj.__str__() B. str(obj) C. print obj D. __str__(obj)
Explanation:Execute in shell to verify.