Given the following code
list_a = ['Zara', 'Nike', 'Addidas', 'Uniqlo']
list_b = ['Nike', 'Addidas']
result = []
for brand in list_a:
for brand_two in list_b:
if brand_two != brand:
result.append(brand)
print(result)
Issue
I am trying to get elements that are only present in either list_a or list_b not both. I am getting the following output right now.['Zara', 'Zara', 'Nike', 'Addidas', 'Uniqlo', 'Uniqlo']
but i am expecting only ['Zara', 'Uniqlo']