#NEWLINE# def split_list( l , N ) : #NEWLINE# #INDENT# ' Split list l into N sublists of equal size ' #NEWLINE# step = int ( ( len ( l ) / N ) ) #NEWLINE# div_points = range ( 0 , ( len ( l ) + 1 ) , div_points ) #NEWLINE# return [ l [ div_points [ i ] : div_points [ ( i + 1 ) ] ] for i in range ( N ) ]