Advertisement
rfmonk

string_maketrans.py

Dec 29th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import string
  4.  
  5. leet = string.maketrans('abegiloprstz', '463611092572')
  6.  
  7. s = 'The quick brown fox jumped over the lazy dog.'
  8.  
  9. print s
  10. print s.translate(leet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement