File size: 192 Bytes
e1cda2e
 
 
 
 
 
1
2
3
4
5
6
7
def clean_text(text: str) -> str:
    """
    Clean the text by removing unwanted characters and formatting.
    """
    cleaned_text = text.replace("\n", " ").strip()
    return cleaned_text