How can I go through a list, such that each pair of element is considered once?
For example:
myList = ["fruit", "bread", "meat", "cheese"]
I would need to compare:
fruit - bread
fruit - meat
fruit - cheese
bread - meat
bread - cheese
meat - cheese
Is there an efficient way to achieve this?