Python base64编码解码实例

这篇文章主要介绍了Python base64编码解码实例,本文直接给出实例代码,使用也很简单,需要的朋友可以参考下

Python中进行Base64编码和解码要用base64模块,代码示例:

 #-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64           #Y25ibG9ncw== print base64.b64decode(str64)  #cnblogs 

以上就是Python base64编码解码实例的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » python