i know there is a very similar question: Itertools product without repeating duplicates
but i have something different.For example:
a = [\'add\', \'sub