def read_data_list(ofile):
 data = [next(ofile)]
 if (data[0].strip()[0] == '{'):
  raise ValueError('This looks like a sparse ARFF: not supported yet')
 data.extend([i for i in ofile])
 return data

def read_data_list ( ofile ) : data = [ next ( ofile ) ] if ( data [ 0 ] . strip ( ) [ 0 ] == '{' ) : raise ValueError ( 'This looks like a sparse ARFF: not supported yet' ) data . extend ( [ i for i in ofile ] ) return data
read each line of the iterable and put it in a list .