多米娱乐网
您的当前位置:首页Pythonbase编码解码实例

Pythonbase编码解码实例

来源:多米娱乐网


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

#-*- coding: utf-8 -*-
import base

str = 'cnblogs'
str = base.bencode(str)
print str #Y25ibG9ncw==
print base.bdecode(str) #cnblogs
显示全文