Why isn't the output of x
single-quoted like y
? My speculation so far is that because there's a single-quote inside x
it makes it awkward if it would be printed with single-quotes. How can I prevent that from happening? Does it have to do something with escape sequences?
x = "-Why's that?"
y = "-What are you talking about dude?"
print ("%r\n%r")% (x, y)
Output:
"-Why's that?"
'-What are you talking about dude?'