0 out of 464 challenges solved
Write a Python function `sort_sublists` that takes a list of lists of strings as input and returns a new list where each sublist is sorted in ascending order. #### Example Usage ```python [main.nopy] print(sort_sublists([['green', 'orange'], ['black', 'white'], ['white', 'black', 'orange']])) # Output: [['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']] print(sort_sublists([['a', 'b'], ['d', 'c'], ['g', 'h'], ['f', 'e']])) # Output: [['a', 'b'], ['c', 'd'], ['g', 'h'], ['e', 'f']] ```
def sort_sublists(list_of_lists):
"""
Sort each sublist of strings in a given list of lists.
Args:
list_of_lists (list of list of str): A list containing sublists of strings.
Returns:
list of list of str: A new list with each sublist sorted.
"""
# Implement the function here
pass