对输入字符进行编码 思路:利用字符对应的ASCII 码,进行移位,实现加解码 # 编码 def encode(x): for i in x: if i.isspace(): print(' ', end='')