Guest User

Untitled

a guest
Aug 14th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Storing the output of a for loop through each iteration
  2. def encrypt(key):
  3. for char in (key):
  4. val = (ord(char)) - (96)
  5.  
  6. encrypt("lol")
  7. 12
  8. 15
  9. 12
  10.  
  11. def encrypt(key):
  12. return [ (ord(char)-96) for char in key ]
  13.  
  14. def encrypt(key):
  15. temp = list()
  16. for char in(key):
  17. temp.append((ord(char))-96)
  18. return temp
Add Comment
Please, Sign In to add comment