Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 322 Bytes

14.md

File metadata and controls

16 lines (12 loc) · 322 Bytes
@author jackzhenguo
@desc 
@date 2019/2/15

14 字符串转字节  

字符串转换为字节类型

In [12]: s = "apple"                                                            

In [13]: bytes(s,encoding='utf-8')                                              
Out[13]: b'apple'