python exclude n from string code example Example: get rid of n in string python a_string = a_string.rstrip("\n")