1
0
forked from tdwojak/Python2018

Zaktualizuj 'labs02/task11.py'

This commit is contained in:
Miłosz Maliszewski 2018-06-13 17:40:31 +00:00
parent 4be2ec1074
commit 66ca93cd4c

View File

@ -8,8 +8,14 @@ uporządkowaną listę wspólnych liter z lańcuchów string1 i string2.
Oba napisy będą składać się wyłacznie z małych liter.
"""
def common_chars(string1, string2):
pass
s=string1.replace(' ','')
t=string2.replace(' ','')
s=set(s)
t=set(t)
zwracam = sorted(s & t)
return list(''.join(zwracam))
def tests(f):
@ -23,4 +29,4 @@ def tests(f):
return "TESTS PASSED"
if __name__ == "__main__":
print(tests(common_chars))
print(tests(common_chars))