1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-11-26 14:08:10 +01:00
parent 32d82a2556
commit a33c14f1bb

View File

@ -9,18 +9,22 @@ Np. leet('leet') powinno zwrócić '1337'.
def leet_speak(text):
lista_temp = []
for i in text:
text_tmp = str(text)
text_tmp = text_tmp.replace('[', '')
text_tmp = text_tmp.replace(']', '')
text_tmp = text_tmp.replace("'", '')
lista_temp = ""
for i in text_tmp:
if i =='e':
lista_temp +=3
lista_temp.append('3')
elif i =='l':
lista_temp +=1
lista_temp.append('1')
elif i =='o':
lista_temp +=0
lista_temp.append('0')
elif i =='t':
lista_temp +=7
lista_temp.append('7')
else:
lista_temp += i
lista_temp.append(i)
return lista_temp
def tests(f):