题解 | #字符串加密#
字符串加密
https://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3
table=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
s=input()
m=input()
table2=[]
for each in s:
if each not in table2:
table2.append(each)
continue
for each in table:
if each not in table2:
table2.append(each)
find={}
for i in range(26):
key=table[i]
value=table2[i]
find[key]=value
put=[]
for each in m:
put.append(find[each])
print("".join(put))
建立字典
