python 字符串 類型互相轉換 str bytes 字符串連接

直接看例子:

n = 888
print bytes(n)+str1
print str(n)+str1
print type(n)
n = bytes(n)
print type(n)
n = str(n)
print type(n)

查看結果

8881234567
8881234567
<type 'int'>
<type 'str'>
<type 'str'>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章