2013-07-06 50 views

回答

0

您遍歷每個元素:

encrypted = '' 

for character in secret: 
    encrypted += dictionary[character] 

或者更簡潔:

encrypted = map(dictionary.get, secret) 
相關問題