Using decode()
Output
Easy ✅
Using decode(), you can convert bytes into string. Here, we have used utf-8 for decoding. \xE2\x9C\x85 is the utf-8 code for ✅.
You can learn about encoding on Python String encode().
Learn Python practically
and Get Certified.
To understand this example, you should have the knowledge of the following Python programming topics:
Output
Easy ✅
Using decode(), you can convert bytes into string. Here, we have used utf-8 for decoding. \xE2\x9C\x85 is the utf-8 code for ✅.
You can learn about encoding on Python String encode().