forked from tdwojak/Python2017
Done
This commit is contained in:
parent
f6485d1e7a
commit
9155f1e9ae
@ -9,8 +9,11 @@ Np. leet('leet') powinno zwrócić '1337'.
|
|||||||
|
|
||||||
|
|
||||||
def leet_speak(text):
|
def leet_speak(text):
|
||||||
pass
|
replacements = (('e','3'),('l','1'),('o','0'),('t','7'))
|
||||||
|
new_string = text
|
||||||
|
for old, new in replacements:
|
||||||
|
new_string = new_string.replace(old, new)
|
||||||
|
return (new_string)
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [['leet'], ['do not want']]
|
inputs = [['leet'], ['do not want']]
|
||||||
|
Loading…
Reference in New Issue
Block a user