Strings
in which standard letters are often replaced by numerals or special characters.
Letter |
Becomes |
---|---|
a |
@ |
o |
0 |
e |
3 |
l |
1 |
s |
5 |
t |
7 |
In this exercise, you’ll make a function that translate a word to leet-speak:
>>> translate_leet("Hi Balloonicorn")
'Hi B@1100nic0rn'
>>> translate_leet("Hackbright is the Shizzle")
'H@ckbrigh7 i5 7h3 5hizz13'
We’ve given you leet.py, which includes the stub of a
translate_leet
function:
def translate_leet(phrase):
"""Translates input into "leet-speak"."""