So to give a rough example without any code written for it yet, I\'m curious on how I would be able to figure out what both lists have in common.
Example:
i think this is what u want ask me anything about it i will try to answer it
listA = ['a', 'b', 'c']
listB = ['a', 'h', 'c']
new1=[]
for a in listA:
if a in listB:
new1.append(a)
john = 'I love yellow and green'
mary = 'I love yellow and red'
j=john.split()
m=mary.split()
new2 = []
for a in j:
if a in m:
new2.append(a)
x = " ".join(new2)
print(x)