while True: code = input('请输入要解码的内容:') code = eval(code) ans = int(input('请输入偏移量:')) words = '' for num in code: w = chr(num) num = num - ans words = words + w print('解码的结果为:' + words)