isplit

lsst.utils.iteration.isplit(string: T, sep: T) Iterator[T]

Split a string or bytes by separator returning a generator.

Parameters:
stringstr or bytes

The string to split into substrings.

sepstr or bytes

The separator to use to split the string. Must be the same type as string. Must always be given.

Yields:
subsetstr or bytes

The next subset extracted from the input until the next separator.