Is that separaters are multi character string? Is it really common?
I feel single-char separaters vs multiple-chars string separaters is good line to chose simple algorithm vs regex or Aho-Corasick.
This works well in Go.
sep (e.g. \\) and altsep (e.g. /) are single characters. So str.split_by_chars(seps: str) and str.find_chars(chars: str) are OK.
Why? If we provide such APIs, why we can ignore long input + many words use cases?
General purpose methods in Python are expected to be works well for non small input.
I expect user may do one_mega_string.count(tuple(thousands_of_words)).