KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
repr() : evaluatable string representation of an object (you can eval() it, meaning it is a string representation that evaluates to a Python object) In other words: >>> x = 'foo' >>> repr(x) "'foo'" Questions: Why do I get the double quotes when I do repr(x) ? (I don't get them when I do str(x) ) Why do I get 'foo' when I do eval("'foo'") and not x which is the object?
Tags (comma-separated)
Save Edits
Cancel