Hi everyone.
Let say I have the following 2 lists with words of different sizes for example,
However, I'd like to seek your help on how can I achieve the the following desired output please?
Let say I have the following 2 lists with words of different sizes for example,
list0=['guava','apple','banana','strawberry','orange'] list1=['orange','pineapple','apple']
difference=list(set(list0).symmetric_difference(list1)) print(difference)
Output:['banana', 'guava', 'strawberry', 'pineapple']
Output above is the mix of words that are not present in both sets that I am only able to do at this stage.However, I'd like to seek your help on how can I achieve the the following desired output please?

Output:Words appear in first list and not second list = guava, banana, strawberry
Words appear in second list and not first list = pineapple
Thanks a lot and have a great weekend