How to find max length of any given sublist?



How to find max length of any given sublist?..

Answer / Gajraj Mathur

You can use the `max()` function along with a for loop to find the maximum length of any sublist. Here's an example:n```pythonnsublists = [[1, 2, 3], [4, 5], [6, 7, 8, 9]]nmax_length = max(len(sublist) for sublist in sublists)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is python unit test?

1 Answers  


What is a modifier in python?

1 Answers  


How to read a 10gb (or larger) file size in python?

0 Answers  


How do you make a higher order function in Python?

1 Answers  


What is __init__.py used for?

1 Answers  


What are private methods in python?

1 Answers  


Explain different way to trigger/ raise exception in your python script?

1 Answers  


Can you list down some of the pdb commands for debugging python programs?

1 Answers  


Is python duck typed?

1 Answers  


Is python pass by reference?

1 Answers  


What is flask- wtf? Explain its features.

1 Answers  


How do you append to a file in python?

1 Answers  


Categories