Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python count elements in sublists

def sumOfStudents(students):
    count = sum( [ len(listElem) for listElem in students])
    return count
sumOfStudents(students)
 
PREVIOUS NEXT
Tagged: #python #count #elements #sublists
ADD COMMENT
Topic
Name
7+2 =