code: def iter_slices(string, slice_length):
      
      pos = 0
      if slice_length is None or slice_length <= 0:
          slice_length = len(string)
      while pos < len(string):
          yield string[pos:pos + slice_length]
          pos += slice_length
docs: Iterate over slices of a string.