1
0
forked from tdwojak/Python2017

Update 'labs02/task09.py'

This commit is contained in:
s45164 2017-12-01 17:12:26 +00:00
parent d2eeea8a25
commit 7934874c58

View File

@ -9,9 +9,17 @@ Np. leet('leet') powinno zwrócić '1337'.
def leet_speak(text):
replacements = ( ('e','3'), ('l','1'),
('o','0'), ('o','7') )
my_string = text
new_string = my_string
for old, new in replacements:
new_string = new_string.replace(old, new)
return new_string
pass
def tests(f):
inputs = [['leet'], ['do not want']]
outputs = ['1337', 'd0 n07 wan7']