Python str和bytes的相互轉換

str0 = 'abc' a = bytes(str0, 'utf-8') print(type(str0),str0) print(type(a),a) print('-----------------------') c = bytes([97,98,99,100]) print(type(c),c) str1= str(c,"utf-8") print(type(s
相關文章
相關標籤/搜索