code: def splitlines(self, keepends=False):
          
          lines = self.split('\n')
          return [line+'\n' for line in lines] if keepends else (
                 lines if lines[-1] else lines[:-1])
docs: Return a list of lines, split on newline characters,
          include line boundaries, if keepends is true.