Strings in lexicographic order (silo)¶
The function silo can be used to iterate through strings in lexicographic order in some range.
- silo(alphabet: str, upper_bound: int, first: str, last: str) Iterator¶
Returns an iterator to strings in lexicographic order (silo).
- Parameters
- Returns
An iterator to strings in lexicographic order over the alphabet
alphabetof length at mostupper_boundin the range[first, last).
>>> from libsemigroups_pybind11 import silo >>> list(silo("ba", 3, "b", "aaa")) ['b', 'bb', 'ba', 'a', 'ab', 'aa']