def chunkify(sequence, chunksize):
 for i in range(0, len(sequence), chunksize):
  (yield sequence[i:(i + chunksize)])

def chunkify ( sequence , chunksize ) : for i in range ( 0 , len ( sequence ) , chunksize ) : ( yield sequence [ i : ( i + chunksize ) ] )
yield successive chunks from sequence .