From 96214d2d3f47d0abf622ba60ea6661e4cccefe8a Mon Sep 17 00:00:00 2001 From: "wagner.agnieszka" Date: Fri, 1 Jun 2018 19:04:52 +0200 Subject: [PATCH] passed --- labs02/task11.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/labs02/task11.py b/labs02/task11.py index 7d36767..befe374 100644 --- a/labs02/task11.py +++ b/labs02/task11.py @@ -9,8 +9,12 @@ Oba napisy będą składać się wyłacznie z małych liter. """ 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): inputs = [["this is a string", "ala ma kota"]]