def endswith_cr(line):
 return line.endswith(('\r' if isinstance(line, str) else '\r'))

def endswith_cr ( line ) : return line . endswith ( ( '\r' if isinstance ( line , str ) else '\r' ) )
return true if line ends with .