题解 | #字符串加密#
字符串加密
https://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3
算是最直接的想法吧
key = input() string = input() l1 = "abcdefghijklmnopqrstuvwxyz" l2 = '' for i in key: if i not in l2: l2 += i for i in l1: if i not in l2: l2 += i for i in string: print(l2[l1.find(i)],end='')