possible pairings in a set

Benjamin Peterson benjamin at python.org
Sun Apr 5 02:53:01 CEST 2009


Ross <ross.jett <at> gmail.com> writes:
> Can you guys help me out?

Do you have Python 2.6? If so, it's a solved problem. :)

import itertools
possible_pairings = list(itertools.combinations(players, 2))







More information about the Python-list mailing list