human
remove (chomp) a newline
assistant
Here is some code to remove newline in string 'Windows EOL\r\n' on the right side

'Windows EOL\r\n'.rstrip('\r\n')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.