1
0
Fork 0

Merge remote-tracking branch 'origin/master'

This commit is contained in:
s441403 2018-06-02 13:55:38 +02:00
commit c0a7d2aed1
2 changed files with 19 additions and 3 deletions

View File

@ -10,8 +10,15 @@ na wielką. Np. pokemon_speak('pokemon') powinno zwrócić 'PoKeMoN'.
def pokemon_speak(text):
lista = list(text)
lista[::2].capitalize()
wynik = "".join(lista)
result = []
for i in range(len(lista)):
if i == 0 or i % 2 == 0:
result.append(lista[i].upper())
else:
result.append(lista[i])
wynik = "".join(result)
return wynik

View File

@ -9,7 +9,16 @@ Oba napisy będą składać się wyłacznie z małych liter.
"""
def common_chars(string1, string2):
pass
string1 = string1.replace(' ','')
string2 = string2.replace(' ','')
lista1 = list(string1)
lista2 = list(string2)
wynik = set()
wynik = {x for x in lista1 if x in lista2}
result = list(wynik)
result.sort()
return result
def tests(f):