• why are my solusion is wrong?

Question related to mission Common Words

 
a=line1.split(',')
b=line2.split(',')
m=''
for i in a:
    for n in b:
        if i==n:
            m +=i

        else:
            return ''
        return m