get unique values of list and compare a string python code example Example: python list with only unique values my_list = list(set(my_list))