Andrej Mitrovic wrote:
The "".join idiom itself is widespread (amongst those who know about
it, at least). It's mentioned in several books and Python tutorials.
As for taking random string samples, I've never used it so I can't
judge whether it's common or not.

Yes, taking random substring samples seems very obscure to me.

Sure, taking a random index into a string may wind up in the middle of a UTF8 sequence. But, in practice, indices into strings are not random. They are the result of some other operation on a string, and so they point to the start of a UTF8 sequence.

Reply via email to