字符串正在引号内打印

时间:2013-05-12 07:47:17

标签: python string printing quotes

示例:

>>> print "How do you do"

打印为

'How do you do'

>>> x = "How do you do"
>>> print x
'How do you do'

我刚开始学习python。我的所有打印命令都以这种方式出现。我该怎么办?

1 个答案:

答案 0 :(得分:2)

>>> x = "How do you do"
>>> x
'How do you do' # representation of x
>>> print x
How do you do # printed version of x