<human>:  remove (chomp) a newline
<bot>: Here is some code to remove newline in string 'Mac EOL\r'

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

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