[Tutor] How can I find a group of characters in a list of strings?
Steven D'Aprano
steve at pearwood.info
Thu Jul 26 01:57:44 EDT 2018
On Wed, Jul 25, 2018 at 05:29:27PM -0700, Martin A. Brown wrote:
> If I only had to do this once, over only a million items (given
> today's CPU power), so I'd probably do something like the below
> using sets.
The problem with sets is that they collapse multiple instances of
characters to a single one, so that 'ABC' will match 'ABBBCC'. There's
no indication that is what is required.
--
Steve
More information about the Tutor
mailing list