Subscribe:

Difference between str and repr in Python

by Ikram Kurdi on Monday, May 18, 2009
Both of them convert values to strings, str changes the look of the value, while repr keeps its looks. str converts the data to a reasonable looking format, in other words it translates the data. While repr just takes a picture of the data and draws it again in string format, thus not changing its look.
Share


Next Page Previous Page

Comments

Leave Comment