As mentioned by @Daniel Mesejo comment, use combinations.
>>> import itertools
>>> set(itertools.combinations(['nyc','sf','atl'], 2))
{('nyc', 'atl'), ('sf', 'atl'), ('nyc', 'sf')}
2
solved Unique permutations of a list without repetition
As mentioned by @Daniel Mesejo comment, use combinations.
>>> import itertools
>>> set(itertools.combinations(['nyc','sf','atl'], 2))
{('nyc', 'atl'), ('sf', 'atl'), ('nyc', 'sf')}
2
solved Unique permutations of a list without repetition