def endswith_lf(line):
 return line.endswith(('\n' if isinstance(line, str) else '\n'))

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