Reputation: 15930
In Python, you can define a literal string as a raw string. Surfing on internet, I read that it is equivalent to repr()
. More exactly, I tested that:
r"mystring" == repr("mystring")[1:-1]
Is this always true?
EDIT: the linked question does not answer my question, since it's about difference between raw strings and unicode strings, not raw strings and repr()
.
Upvotes: 0
Views: 267