def iter_slices(string, slice_length):
 pos = 0
 while (pos < len(string)):
  (yield string[pos:(pos + slice_length)])
  pos += slice_length

def iter_slices ( string , slice_length ) : pos = 0 while ( pos < len ( string ) ) : ( yield string [ pos : ( pos + slice_length ) ] ) pos += slice_length
iterate over slices of a string .