def clean_text(text: str) -> str:
    """basic text cleaning of spaces and newlines

    Args:
        text (str): text to clean

    Returns:
        str: cleaned text
    """
    character_list = list()
    text = text.replace('  ', ' ')
    text = text.replace('\n', ' ')
    text = text.lower()
    for character in text:
        if character == ' ' \
                or character.isalpha() \
                or character.isdigit():
            character_list.append(character)

    return ''.join(character_list)