Join our newsletter for the latest updates.

Python Program to Convert Bytes to a String

In this example, you will learn to convert bytes to a string.

To understand this example, you should have the knowledge of the following Python programming topics:

Using decode()

print(b'Easy \xE2\x9C\x85'.decode("utf-8"))


Easy ✅

Using decode(), you can convert bytes into string. Here, we have used utf-8 for decoding.

You can learn about encoding on Python String encode().