1
0
Fork 0

commited tasks

This commit is contained in:
s45150 2017-11-26 23:15:50 +01:00
parent 464d765a82
commit fe8c5810e4
1 changed files with 15 additions and 3 deletions

View File

@ -9,9 +9,21 @@ Oba napisy będą składać się wyłacznie z małych liter.
"""
def common_chars(string1, string2):
print string1
print string2
pass
string1=''.join(sorted(string1))
string1 = string1.strip(' ')
#print string1
string2 = ''.join(sorted(string2))
string2 = string2.strip(' ')
#print string2
slist = list()
for char in string1:
count=string2.count(char)
if count > 0:
if char not in slist:
slist.append(char)
#print(slist)
return(slist)
def tests(f):