What is the difference between __str__ and __repr__?

Subscribers:
4,130
Published on ● Video Link: https://www.youtube.com/watch?v=nv7s248WoVI



Duration: 5:29
4 views
0


What is the difference between __str__ and __repr__?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/165495/casebash)Casebash |
(stackoverflow.com/users/122683/moshez)moshez |
(stackoverflow.com/users/14343/ned-batchelder)Ned Batchelder |
(stackoverflow.com/users/95810/alex-martelli)Alex Martelli |
(stackoverflow.com/users)stackoverflow.com-Community |
(stackoverflow.com/users/2796349/bitoffdev)bitoffdev |
A special thanks goes out to the (https://stackoverflow.com/questions/1436703/what-is-the-difference-between-str-and-repr)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

python magic-methods repr







Tags:
python
magic-methods
repr