Light Mode
Dark Mode
func.sort() & sorted(func)

def checkio(first, second): first = first.split(",") second = second.split(",") same = [i for i in first if i in second] return ",".join(i for i in sorted(same)) if same else ""

This is how I passed the project but my question is why this code is wrong?

def checkio(first, second): first = first.split(",") second = second.split(",") same = [i for i in first if i in second].sort() return ",".join(i for i in same) if same else ""

Created: June 15, 2016, 12:34 p.m.
Updated: June 20, 2016, 4:08 a.m.
0
9
User avatar
saharnasiri71