digits = '1234567890' * 2
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' * 2
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 2
text = input('请输入字符串:')
new_text = ''
for c in text:
if c in digits:
new_c = digits[digits.index(c) + 2]
elif c in ascii_lowercase:
new_c = ascii_lowercase[ascii_lowercase.index(c) + 2]
elif c in ascii_uppercase:
new_c = ascii_uppercase[ascii_uppercase.index(c) + 2]
else:
new_c = c
new_text += new_c
print(f'加密后的字符串为:{new_text}')