Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

__repr__ vs __str__

Give Feedback

This lesson compares __repr__ and __str__. You’ll see when it is appropriate to use each dunder method and how some of the built-in Python functions use the two.

Comments & Discussion

Become a Member to join the conversation.