0 out of 464 challenges solved
Write a Python function `find_min_length` that takes a list of lists as input and returns the length of the smallest list within it. If the input list is empty, return `0`. #### Example Usage ```python [main.nopy] print(find_min_length([[1], [1, 2]])) # Output: 1 print(find_min_length([[1, 2], [1, 2, 3], [1, 2, 3, 4]])) # Output: 2 print(find_min_length([[3, 3, 3], [4, 4, 4, 4]])) # Output: 3 print(find_min_length([])) # Output: 0 ```
def find_min_length(lst): """ Find the length of the smallest list in a list of lists. Args: lst (list of lists): A list containing sublists. Returns: int: The length of the smallest sublist, or 0 if the input list is empty. """ # Check if the input list is empty if not lst: return 0 # Placeholder for the solution pass