>> print str("Hello, World !")hello, world ! >>print repr("Hello, World !")‘Hello, World !‘ >> temp = 2 >> print "The number is " + tempThe number is 2
>> print str("Hello, World !")hello, world !
>>print repr("Hello, World !")‘Hello, World !‘
>> temp = 2 >> print "The number is " + tempThe number is 2
temp
Python 之 str 、 repr 、 反引号(``)的区别
原文:http://blog.51cto.com/3633188/2162622