def clean(tagged):
    """clean tags and new lines out of list of attributes"""

    n = len(tagged)
    # strip tags
    untagged = [tagged[i].text for i in range(n)]

    # replace newlines with space
    stripped = [untagged[i]
                .replace('\n\n+', ' ')
                .replace('\n', ' ')
                .replace('\r', ' ')
                for i in range(n)]

    # strip trailing spaces
    nolines = [stripped[i].strip() for i in range(n)]
    return nolines