def strip_shell_chars(input_str):
 stripped_str = rstrip_last_char(input_str, '\n')
 stripped_str = rstrip_last_char(stripped_str, '\r')
 return stripped_str

def strip_shell_chars ( input_str ) : stripped_str = rstrip_last_char ( input_str , '\n' ) stripped_str = rstrip_last_char ( stripped_str , '\r' ) return stripped_str
strips the last or or string at the end of the input string .