题解 | #简单密码#
简单密码
https://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
while True: try: A="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" B="22233344455566677778889999bcdefghijklmnopqrstuvwxyza0123456789"#多对一的思路重复几次数字 list1=[] list2=[] for i in A: list1.append(i) for i in B: list2.append(i) C=[] a=input() for i in a: if i in list1: C.append(list2[list1.index(i)])#列表的元素索引 else: C.append(i) print(''.join(C)) except: break