str 、 repr 、 `` 、是將Python值轉換爲字符串的3種方式ide
print str("Hello, World !")hello, world !code print repr("Hello, World !")'Hello, World !'字符串 temp = 2 print "The number is " + tempThe number is 2it
print str("Hello, World !")hello, world !code
print repr("Hello, World !")'Hello, World !'字符串
temp = 2 print "The number is " + tempThe number is 2it
temp