Monday 15 June 2015

simple encrypt with key and string for python -


Here's an example of what my code needs:

  encrypt ('7521068493 ',' 123 ') # 521'   

returns

keys that change 0-9 For example 7 0 , 5 is 1 , 2 is 2 , 1 is 3 , and so on.

The second string is the string that needs to be encrypted.

Here is my code:

  def encrypt (key, string): in the range I (LAN): I print (string) in the string   

I can not understand it

  def encrypt (key , Msg): cypher = {x: y in z, z ('0123456789', key)} Encrypted = [] in C: msg: encrypted.append (cipher [C]) returns '' .join (encrypted)    

No comments:

Post a Comment