Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Jednostavno i kratko :) solution in Clear category for Common Words by AlanBuric
def checkio(line1: str, line2: str) -> str:
return ','.join(sorted(set(line1.split(',')) & set(line2.split(','))))
print("Example:")
print(checkio("hello,world", "hello,earth"))
assert checkio("hello,world", "hello,earth") == "hello"
assert checkio("one,two,three", "four,five,six") == ""
assert checkio("one,two,three", "four,five,one,two,six,three") == "one,three,two"
print("The mission is done! Click 'Check Solution' to earn rewards!")
Dec. 8, 2022