def remove_whitespace(sentences):
    """
    Clear out spaces and newlines
    from the list of list of strings.

    Arguments:
    ----------
        sentences : list<list<str>>

    Returns:
    --------
        list<list<str>> : same strings as input,
            without spaces or newlines.
    """
    return [[w.rstrip() for w in sent] for sent in sentences]