(string, slice_length)
Iterate over slices of a string.
Iterate over slices of a string.
Iterate over slices of a string .
def iter_slices(string, slice_length):
    """Iterate over slices of a string."""
    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