x=list(input())
y=list(input())
for a in x:
if a in y:
x.remove(a)
y.remove(a)
print(x, y)
I can't get the exact answer for this code if I gave input like this
x = "lilly"
y ="daliya"
The output must be
(l,l) (d, a, a)
But it is
(i, l, l) (d, a, i, a)