1def meanGroups(a):
2 d = []
3 e = []
4 for i, j in enumerate(a):
5 if sum(j) / len(j) not in e:
6 e += [sum(j) / len(j)]
7 d += [[i]]
8 else:
9 d[e.index(sum(j) / len(j))] += [i]
10 return d
11