Python - Byte

> Procedural Languages > Python > Python - Data Type

1 - About

Byte - Computer storage Unit in Python

Empty byte

b''

3 - To

3.1 - toString

Python - String (str type)

  • Python 2
encoding = 'utf-8'
'nico'.decode(encoding)
# or
unicode('nico', encoding)
  • Python 3
encoding = 'utf-8'
str(b'nico', encoding)
# or
b'hello'.decode(encoding)
Advertising
lang/python/type/byte.txt · Last modified: 2019/09/08 21:37 by gerardnico