def degre(matrice): d = [] for sommet in matrice: cpt = 0 for arete in sommet: cpt = cpt + arete d.append(cpt) return d