# 肯定數據類型,傳入的數是一個類型,返回True print(isinstance('111',str)) print(isinstance(111,str)) print(isinstance([1,2,3],list)) print(isinstance({1:2},dict)) ### True False True True
data = b'hello s11' data = str(data, encoding='utf-8') print(data,type(data)) data = bytes(data, encoding='utf-8') print(data,type(data))