In [5]:
decode()
Decodes the string using the specified codec.
### decode()
**Description:**
Decodes bytes to string using the specified encoding. Only applicable to byte objects.
**Example:**
“`python
byte_data = b’hello’
print(byte_data.decode(‘utf-8’)) # Output: ‘hello’
“`
**Use Case:**
Used when handling byte streams or encoded data from files or networks.