站长资源脚本专栏
Python base64编码解码实例
简介Python中进行Base64编码和解码要用base64模块,代码示例:#-*- coding: utf-8 -*-import base64str = 'cnblogs'str64 = base64.b64encode(str)print str64 #Y25ibG9nc
Python中进行Base64编码和解码要用base64模块,代码示例:
#-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64 #Y25ibG9ncw== print base64.b64decode(str64) #cnblogs
上一篇:Python实现线程池代码分享
下一篇:Python os模块学习笔记