• 홈
  • 카테고리
  • 아카이브

python

python byte to string

작성일 2019-06-07 | 0 comments
byte 문자열을 string으로 바꾸는 방법

파이썬 Bytes 타입을 str 타입으로 바꾸는 방법

1
2
3
4
5
6
7
8
>>> text = b'hello'
>>> type(text)
<class 'bytes'>
>>> text.decode('utf-8')
'hello'
>>> text = text.decode('utf-8')
>>> type(text)
>>> <class 'str'>
# python byte to string # 파이썬 바이트 문자열
Python sort와 sorted
가비지 컬렉터
© 2021 Lowell
Powered by Jekyll
Theme - NexT.Muse