#NEWLINE# def partitionis3( n , step , seq = EMPTY ) : #NEWLINE# #INDENT# if ( seq is EMPTY ) : #NEWLINE# #INDENT# ( step , seq ) = ( n , step ) #NEWLINE# #UNINDENT# it = iter ( seq ) #NEWLINE# pool = take ( n , it ) #NEWLINE# while True : #NEWLINE# #INDENT# if ( len ( pool ) < n ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# ( yield pool ) #NEWLINE# pool = ( pool [ step : ] + take ( step , step ) )