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
相关文章
相关标签/搜索