题解 | #简单密码#
简单密码
https://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
s = input()
l = []
for i in s:
if i.isupper():
if i == 'Z':
l.append('a')
else:
l.append(chr(ord(i)+1).lower())
elif i.islower():
if i in 'abc':
l.append('2')
elif i in 'def':
l.append('3')
elif i in 'ghi':
l.append('4')
elif i in 'jkl':
l.append('5')
elif i in 'mno':
l.append('6')
elif i in 'pqrs':
l.append('7')
elif i in 'tuv':
l.append('8')
else:
l.append('9')
else:
l.append(i)
print(''.join(l))