forked from tdwojak/Python2018
rozwiazanie zad11
This commit is contained in:
parent
493056edb6
commit
776abbce40
@ -9,7 +9,24 @@ Oba napisy będą składać się wyłacznie z małych liter.
|
||||
"""
|
||||
|
||||
def common_chars(string1, string2):
|
||||
pass
|
||||
n= string1
|
||||
m= string2
|
||||
li = []
|
||||
if len(n) >= len(m):
|
||||
for i in range(len(n)):
|
||||
for j in range(len(m)):
|
||||
if n[i] == m[j]:
|
||||
li.append(n[i])
|
||||
|
||||
else:
|
||||
for i in range(len(m)):
|
||||
for j in range(len(n)):
|
||||
if m[i] == n[j]:
|
||||
li.append(m[i])
|
||||
li = list(set(li))
|
||||
li.remove(' ')
|
||||
li.sort()
|
||||
return li
|
||||
|
||||
|
||||
def tests(f):
|
||||
|
Loading…
Reference in New Issue
Block a user