Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DICTFILE="LeetDict.txt" # http://pastebin.com/fnyFXLyN
- with open(DICTFILE,"r") as f:
- temp=f.read().split("\n")
- LeetDict={}
- for i in temp:
- if i:
- LeetDict[i.split(":")[0]]=i.split(":")[1]
- def leetize(string,leetz=("etiolsazbg","3710154289"),shorts=LeetDict):
- res=""
- for i in shorts:
- string=string.replace(i,shorts[i])
- for i in string:
- if i.lower() in leetz[0]:
- res+=leetz[1][leetz[0].index(i.lower())]
- else:res+=i
- return res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement