#!/usr/bin/env python
from random import shuffle
from itertools import izip_longest
POOL_NAMES = ("Pool 1", "Pool 2")
if __name__ == "__main__":
pools = {}
for pool_name in POOL_NAMES:
pools[pool_name] = []
inpt = None
while inpt != "":
inpt = raw_input("Enter a name to go in %s or hit Enter when done\n-> " % pool_name)
if inpt:
pools[pool_name].append(inpt)
shuffle(pools[pool_name])
teams = izip_longest(*pools.values())
for i, team in enumerate(teams, 1):
print "Team %s:" % i
print ", ".join(str(x) for x in team)