Python -- Get the unique items of two lists [Example]
# Lists
list_1 = ['a', 'b', 'c']
list_2 = ['q', 's', 'c']
# Get the unique items
unique = [i for i in list_1 if i not in list_2]
# Output
print(unique)
Output:
['a', 'b']
# Lists
list_1 = ['a', 'b', 'c']
list_2 = ['q', 's', 'c']
# Get the unique items
unique = [i for i in list_1 if i not in list_2]
# Output
print(unique)
Output:
['a', 'b']