式:
In [0]: sleague1 = ['Giants', 'Tigers', 'Dragons', 'BayStars', 'Carp', 'Swallows']
In [1]: sleague2 = ['Giants', 'Tigers', 'Dragons', 'BayStars', 'Carp', 'Swallows']
In [2]: for x in sleague1:
...: sleague2.remove(x)
...: for y in sleague2:
...: print(x, 'vs', y)
...:
結果:
Giants vs Tigers
Giants vs Dragons
Giants vs BayStars
Giants vs Carp
Giants vs Swallows
Tigers vs Dragons
Tigers vs BayStars
Tigers vs Carp
Tigers vs Swallows
Dragons vs BayStars
Dragons vs Carp
Dragons vs Swallows
BayStars vs Carp
BayStars vs Swallows
Carp vs Swallows