The rule of literal string

Li Han lihang9999 at gmail.com
Wed Dec 17 18:52:46 EST 2008


Chris worte:
[snip]
> And repr("''") ==> "\"''\""
> Which when print()-ed is: "''"
> And eval("''") is the same as entering two apostrophes ('') at the
> REPL, both of which give an empty string object.

On my machine:
>>> repr("''")
'"\'\'"'
Han



More information about the Python-list mailing list