Question #112

What happens if a class does not implement __str__()?

If __str__ is missing, print and any function using str() invokes __repr__() of the object. (journaldev.com/22460/python-str-repr-functions)


Comment on Disqus:

Question difficulty: πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅