From 3f9c87d72ad3b292f5860fa550318de600475edf Mon Sep 17 00:00:00 2001 From: Ewelina Date: Mon, 27 Nov 2017 20:39:58 +0100 Subject: [PATCH] task11 passed --- labs02/task11.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/labs02/task11.py b/labs02/task11.py index 7d36767..bdb94de 100644 --- a/labs02/task11.py +++ b/labs02/task11.py @@ -9,7 +9,20 @@ Oba napisy będą składać się wyłacznie z małych liter. """ def common_chars(string1, string2): - pass + lista1 = list(string1) + lista2 =list(string2) + unique_val = set() + for i in lista1: + for x in lista2: + if i == x: + if i.isspace(): + pass + else: + unique_val.add(i) + lista = list(unique_val) + lista.sort() + return(lista) + def tests(f):