Answers for "python meanGroups(a):"

0

python meanGroups(a):

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
Posted by: Guest on November-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language