Python: Find the list with maximum and minimum length
Find List with Max and Min Lengths
Write a Python program to find a list with maximum and minimum lengths.
Visual Presentation:

Sample Solution:
Python Code:
Sample Output:
Original list: [[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]] List with maximum length of lists: (3, [13, 15, 17]) List with minimum length of lists: (1, [0]) Original list: [[0], [1, 3], [5, 7], [9, 11], [3, 5, 7]] List with maximum length of lists: (3, [3, 5, 7]) List with minimum length of lists: (1, [0]) Original list: [[12], [1, 3], [1, 34, 5, 7], [9, 11], [3, 5, 7]] List with maximum length of lists: (4, [1, 34, 5, 7]) List with minimum length of lists: (1, [12])
Flowchart:

For more Practice: Solve these Related Problems:
- Write a Python program to find the longest sublist within a list of lists.
- Write a Python program to find the shortest sublist within a list of lists.
- Write a Python program to sort a list of lists by length.
- Write a Python program to filter out lists shorter than a given length.
Python Code Editor:
Previous: Write a Python program to count number of lists in a given list of lists.
Next: Write a Python program to check if a nested list is a subset of another nested list.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics