题解 | #字符串加密#
字符串加密
https://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3
key = input() s = input() A = 'abcdefghijklmnopqrstuvwxyz' kkey = '' for i in key: if i not in kkey: kkey += i for i in A: if i not in kkey: kkey += i res = '' for i in s: res += kkey[A.index(i)] print(res)