What is the difference between __str__ and __repr__? Asked 07 September, 2021 Viewed 2.9K times python magic-methods repr 58 Votes 25 Answers What is the difference between __str__ and __repr__ in Python? python magic-methods repr Your reply on this question: Add Reply Cancel 25 Answer Order by Voted Recent Oldest Submit an answer Embed images in Question