"remove newline in string ""hello\n\n\n"" on the right side",'Hello\n\n\n'.rstrip('\n')