1
0
forked from tdwojak/Python2018

zad 11 ready

This commit is contained in:
Ola Piechowiak 2018-05-31 22:32:16 +02:00
parent 02ce6f4aaf
commit 9e147f83d2

View File

@ -9,7 +9,15 @@ Oba napisy będą składać się wyłacznie z małych liter.
""" """
def common_chars(string1, string2): def common_chars(string1, string2):
pass string1 = set(string1.replace(" ", ""))
string2 = set(string2.replace(" ", ""))
common = []
for a1 in string1:
for a2 in string2:
if a1 == a2:
common.append(a1)
common.sort()
return common
def tests(f): def tests(f):