Question : python count elements in sublists
Answered by : zeldaisanerd
def sumOfStudents(students): count = sum( [ len(listElem) for listElem in students]) return count
sumOfStudents(students)
Source : | Last Update : Wed, 10 Feb 21
Answered by : zeldaisanerd
def sumOfStudents(students): count = sum( [ len(listElem) for listElem in students]) return count
sumOfStudents(students)
Source : | Last Update : Wed, 10 Feb 21