如何让我的程序在单独的行上打印答案+该行对应的键是什么?
def break_crypt(message):
for key in range(1,27):
for character in message:
if character in string.uppercase:
old_ascii=ord(character)
new_ascii=(old_ascii-key-65)%26+65
new_char=chr(new_ascii)
sys.stdout.write(new_char),
elif character in string.lowercase:
old_ascii=ord(character)
new_ascii=(old_ascii-key-97)%26+97
new_char=chr(new_ascii)
sys.stdout.write(new_char),
else:
sys.stdout.write(character),