Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 393 Bytes

14.md

File metadata and controls

19 lines (13 loc) · 393 Bytes
@author jackzhenguo
@desc 
@date 2019/2/15

14 字符串转字节  

字符串转换为字节类型

In [12]: s = "apple"                                                            

In [13]: bytes(s,encoding='utf-8')                                              
Out[13]: b'apple'
[上一个例子](13.md) [下一个例子](15.md)