forked from tdwojak/Python2017
Resolved
This commit is contained in:
parent
d9564f3b1a
commit
4e8b83e4f2
@ -8,8 +8,18 @@ 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
|
||||
common_letters=[]
|
||||
results=[]
|
||||
for letter in string1:
|
||||
if letter in string2 and ord(letter)<=122 and ord(letter)>=97:
|
||||
common_letters.append(ord(letter))
|
||||
common_letters=set(common_letters)
|
||||
print(common_letters)
|
||||
for letter in common_letters:
|
||||
results.append(chr(letter))
|
||||
return results
|
||||
|
||||
|
||||
def tests(f):
|
||||
|
Loading…
Reference in New Issue
Block a user