最佳答案
在 艰难学习 Python第21页,我看到了这个代码示例:
x = "There are %d types of people." % 10
...
print "I said: %r." % x
为什么在这里使用 %r而不是 %s? 你什么时候会使用 %r,什么时候会使用 %s?