Home > Backend Development > Python Tutorial > Python base64编码解码实例

Python base64编码解码实例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-10 15:10:24
Original
1593 people have browsed it

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

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

str = 'cnblogs'
str64 = base64.b64encode(str)
print str64           #Y25ibG9ncw==
print base64.b64decode(str64)  #cnblogs
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template