python21天打卡Day10-string和bytes互转

a=‘21 python’ b=a.encode(‘utf-8’)#string转为bytes print(’{},{}’.format(b,type(b))) c=b’21 python’ d=c.decode(‘utf-8’) print(’{},{}’.format(d,type(d))) D:\学习\Python工程\venv\Scripts\python.exe D:/学习/Python
相关文章
相关标签/搜索