bytes()

>>> bytes('d',encoding='utf-8')
b'd'
>>> bytes([ord('d')])   # 两种写法等价
b'd'
posted @ 2022-02-03 22:54  chuangzhou  阅读(29)  评论(0)    收藏  举报