def write_text(filename: str, text: str) -> None:
    """
    Writes text to a file.
    """
    with open(filename, 'w') as f:  # type: TextIO
        print(text, file=f)
def write_text ( filename : str , text : str ) -> None : with open ( filename , 'w' ) as f : print ( text , file = f )
Writes text to a file.