diff --git a/labs02/task11.py b/labs02/task11.py index 7d36767..905d1f0 100644 --- a/labs02/task11.py +++ b/labs02/task11.py @@ -9,7 +9,12 @@ Oba napisy będą składać się wyłacznie z małych liter. """ def common_chars(string1, string2): - pass + s1 = string1.replace(' ','') + s2 = string2.replace(' ','') + s1=set(s1) + s2=set(s2) + common = s1 & s2 + return(sorted(list(common))) def tests(f): @@ -23,4 +28,4 @@ def tests(f): return "TESTS PASSED" if __name__ == "__main__": - print(tests(common_chars)) + print(tests(common_chars)) \ No newline at end of file