forked from tdwojak/Python2018
zadania 11
This commit is contained in:
parent
331db64830
commit
94edd37744
@ -9,8 +9,15 @@ Oba napisy będą składać się wyłacznie z małych liter.
|
||||
"""
|
||||
|
||||
def common_chars(string1, string2):
|
||||
pass
|
||||
|
||||
string1 = set(string1.replace(" ", ""))
|
||||
string2 = set(string2.replace(" ", ""))
|
||||
string12 = []
|
||||
for a1 in string1:
|
||||
for a2 in string2:
|
||||
if a1 == a2:
|
||||
string12.append(a1)
|
||||
string12.sort()
|
||||
return string12
|
||||
|
||||
def tests(f):
|
||||
inputs = [["this is a string", "ala ma kota"]]
|
||||
|
Loading…
Reference in New Issue
Block a user