def get_shortest_string(string_list):
    """From a list of strings, returns the string with the shortest length.

    Parameters
    ----------
    string_list: list[str]
        A list of strings

    Returns
    -------
    shortest_string: str
        One of the strings in string_list with the shortest length
    """
    shortest_length = None
    shortest_string = None

    for s in string_list:
        if shortest_string is None or len(s) < shortest_length:
            shortest_length = len(s)
            shortest_string = s
    return shortest_string
def get_shortest_string ( string_list ) : shortest_length = None shortest_string = None for s in string_list : if shortest_string is None or len ( s ) < shortest_length : shortest_length = len ( s ) shortest_string = s return shortest_string
From a list of strings, returns the string with the shortest length.

    Parameters
    ----------
    string_list: list[str]
        A list of strings

    Returns
    -------
    shortest_string: str
        One of the strings in string_list with the shortest length