redis--解析字符串

# coding=utf-8
import codecs

if __name__ == '__main__':
cmdlist = ("Decode")
while True:
cmd = int(input('''input command:
-1:Quit
0:Decode
'''))
if cmd == -1:
break
elif cmd == 0:
name = b'350256270344275240345255246345274237'.decode('utf-8')
f = codecs.open("Decode.txt", "w", "utf-8")
f.write(name)
f.close()
print(name)
else:
print("cmd error")
continue

原文地址:https://www.cnblogs.com/barfoo/p/9415050.html