- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get length of a list of lists in Python?
You can employ a nested loop to count number of elements in each sublist of a list
>>> a=[[1, 2, 3], [4, 5, 6]] >>> c=0 >>> for x in a: for y in x: c=c+1 >>> c 6
- Related Articles
- How do I get length of list of lists in Java?
- How to join list of lists in python?
- Get positive elements from given list of lists in Python
- How do make a flat list out of list of lists in Python?
- Python - Convert List of lists to List of Sets
- Convert list into list of lists in Python
- How to get the length of a string in Python?
- Convert a list into tuple of lists in Python
- Check if a list exists in given list of lists in Python
- Python - Ways to iterate tuple list of lists
- How to append list to second list (concatenate lists) in Python?
- How to convert a list of lists into a single list in R?
- Custom Multiplication in list of lists in Python
- How to get the size of a list in Python?
- Python - Convert column to separate elements in list of lists

Advertisements