📜  django python base 64 encode - Python代码示例

📅  最后修改于: 2022-03-11 14:45:36.415000             🧑  作者: Mango

代码示例1
import base64

message = "Python is fun"
message_bytes = message.encode('ascii')
base64_bytes = base64.b64encode(message_bytes)
base64_message = base64_bytes.decode('ascii')

print(base64_message)