, Python programmer | Tester and Automator. 1  Well to users both str() and repr() should mean the same thing and same purpose, to provide object representation in string format which is achieved by calling internal methods __str__() and __repr__() respectively. From the official docuentation.