(data)
return [line.strip() for line in split_lines]
Clean a block of data and split into lines.

        Arguments:
            data (string) : String of bAbI data.

        Returns:
            list : List of cleaned lines of bAbI data.
Clean a block of data and split into lines.
Clean a block of data and split into lines .
def data_to_list(data):
        """
        Clean a block of data and split into lines.

        Arguments:
            data (string) : String of bAbI data.

        Returns:
            list : List of cleaned lines of bAbI data.
        """
        split_lines = data.split('\n')[:-1]
        return [line.strip() for line in split_lines]
def data_to_list ( data ) : split_lines = data . split ( '\n' ) [ : - 1 ] return [ line . strip ( ) for line in split_lines ]