This example illustrates how the default key is chosen if we do not specify any
c = groupby(['goat', 'dog', 'cow', 1, 1, 2, 3, 11, 10, ('persons', 'man', 'woman')])
dic = {}
for k, v in c:
    dic[k] = list(v)
dic
Results in
{1: [1, 1],
 2: [2],
 3: [3],
 ('persons', 'man', 'woman'): [('...