用户:MC_PZB查看:0 回复:0 评论:0 创建时间:2022-08-16T17:45:17
【作品展示】

【作品介绍】
这是一个模块,用来用ASCII编码与解码英文
【作品源代码】
def encode(text:str):
code = []
for txt in text:
code.append(bin(ord(txt)))
return code
def decode(code:list):
text = ''
for cd in code:
text += chr(int(cd,2))
return text
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn