Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Encoding and Decoding Base64 String in Python

In [ ]:
import base64
In [ ]:
text = base64.b64encode("how are you".encode()).decode()
text
In [ ]:
base64.b64decode(text).decode()

Comments