Python - bytes를 String으로 변환하는 방법
2022. 5. 27. 15:41ㆍPython 정리
#bytes
bytes =b'hello world, Python'
print(bytes)
print(type(bytes))
#decode bytes to string
result = bytes.decode('utf-8')
print(result)
print(type(result))
'Python 정리' 카테고리의 다른 글
| 클래스의 정의 (0) | 2022.05.07 |
|---|---|
| 독자 예외의 작성 (0) | 2022.05.07 |
| 이름 공간과 스코프 (0) | 2022.05.07 |
| 제너레이터 내포 표기 (0) | 2022.05.07 |
| 집합 내포 표기 (0) | 2022.05.07 |