forked from tdwojak/Python2018
passed
This commit is contained in:
parent
6d503b377c
commit
96214d2d3f
@ -9,8 +9,12 @@ 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 = "this is a string"
|
||||||
|
string2 = "ala ma kota"
|
||||||
|
s = set(string1.replace(" ", ""))
|
||||||
|
t = set(string2.replace(" ", ""))
|
||||||
|
intersect = s & t
|
||||||
|
return(sorted(list(intersect)))
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [["this is a string", "ala ma kota"]]
|
inputs = [["this is a string", "ala ma kota"]]
|
||||||
|
Loading…
Reference in New Issue
Block a user