My list is:
groupA=[\'Russia\', \'Egypt\', \'Saudi Arabia\', \'Uruguay\']
So I want to print all the unique combinations of teams that will
This can do the trick:
groupA = ['Russia', 'Egypt', 'Saudi Arabia', 'Uruguay'] for index, country in enumerate(groupA): for rival in groupA[index+1:]: print('%s vs %s'%(country, rival) )