📜  python meanGroups(a): - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:55.547000             🧑  作者: Mango

代码示例1
def meanGroups(a):
    d = []
    e = []
    for i, j in enumerate(a):
        if sum(j) / len(j) not in e:
            e += [sum(j) / len(j)]
            d += [[i]]
        else:
            d[e.index(sum(j) / len(j))] += [i]
    return d