dict = { 'a': '1', 'b': '2', 'c': '3', 'd': '4'}# 需要加密数据key = 'abcd'keys = ''for i in key: i = dict[i] keys += str(i)print(keys)