题解 | 字符串加密
字符串加密
https://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3
import sys
import string
a= input()
b = input()
ad = set()
na = ""
for _ in a:
if _ not in ad:
ad.add(_)
na+=_
all_s = string.ascii_lowercase
for _ in all_s:
if _ not in ad:
na+=_
ma = {}
for i in range(len(all_s)):
ma[all_s[i]]=na[i]
res=""
for _ in b:
res+=ma[_]
print(res)
python的string.ascii_lowercase 挺好用的
曼迪匹艾公司福利 115人发布
