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

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

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