Python 之 str 、 repr 、 反引号(``)的区别
更新:HHH   时间:2023-1-7


str 、 repr 、 `` 、是将Python值转换为字符串的3种方式

print str("Hello, World !")
hello, world !

print repr("Hello, World !")
'Hello, World !'

temp = 2
print "The number is " + temp
The number is 2

返回编程语言教程...