My result is right and you say it's wrong
I would like to give some feedback about ...
From: http://www.checkio.org/mission/common-words/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
My code is one line long:
def checkio(first, second): return u','.join([c for c in first.split(',') if c in second.split(',')]) #These "asserts" using only for self-checking and not necessary for auto-testing if __name__ == '__main__': assert checkio(u"hello,world", u"hello,earth") == "hello", "Hello" assert checkio(u"one,two,three", u"four,five,six") == "", "Too different" assert checkio(u"one,two,three", u"four,five,one,two,six,three") == "one,three,two", "1 2 3"
And the test says :
Your result: "one,two,three" Right result: "one,three,two" Fail: checkio("one,two,three", "four,five,one,two,six,three")
Which is wrong, because my result is ok.