0
我想使用字典將字符串更改爲整數,但我非常確定如何使用字符串。例如:Python:使用字典對列表中的所有項目進行變異
secret = raw_input(enter the secret code)
list(code)
dictionary = {a:1, b:2, c:3,d:4,e:5,f:6,g:7,h:8,i:9,#etc.}
encryptedSecret = dictionary(code)
return encryptedSecret