Pythonbase64编码解码实例
来源:动视网
责编:小采
时间:2020-11-27 14:34:04
Pythonbase64编码解码实例
Pythonbase64编码解码实例:Python中进行Base64编码和解码要用base64模块,代码示例: #-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64 #Y25ibG9ncw== print base64.b64decode
导读Pythonbase64编码解码实例:Python中进行Base64编码和解码要用base64模块,代码示例: #-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64 #Y25ibG9ncw== print base64.b64decode

Python中进行Base64编码和解码要用base64模块,代码示例:
#-*- coding: utf-8 -*-
import base64
str = 'cnblogs'
str64 = base64.b64encode(str)
print str64 #Y25ibG9ncw==
print base64.b64decode(str64) #cnblogs
Pythonbase64编码解码实例
Pythonbase64编码解码实例:Python中进行Base64编码和解码要用base64模块,代码示例: #-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64 #Y25ibG9ncw== print base64.b64decode