If I press Enter in text input I want to delete this enter line and not the whole text.
In this code will erase everything in txt file.
def line_delete