how to delete enters in a string python code example Example: remove n string a_string = a_string.rstrip("\n")