1
0
forked from tdwojak/Python2017

changed file task 09

This commit is contained in:
s45156 2017-11-23 18:55:40 +01:00
parent 121db08b43
commit 587c6d52a6

View File

@ -9,11 +9,16 @@ Np. leet('leet') powinno zwrócić '1337'.
def leet_speak(text):
let_dict = {'e': 3, 'l': 1, 'o': 0, 't': 7}
let_dict = {'e': '3', 'l': '1', 'o': '0', 't': '7'}
new_word = []
for n in text:
if n in let_dict:
x = let_dict[n]
return text
new_word.append(x)
else:
new_word.append(n)
new_word_joined = ''.join(new_word)
return new_word_joined
def tests(f):