See my implementation, is generic and not only for strings. It could be added to more-itertools, I suppose:
https://mail.python.org/archives/list/[email protected]/message/E452LQGA3XKU5ADPTG54XP36ENXDZN2B/ _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/TOCNFSPMUZSCFZCUEXMAOYEDYS65UDQH/ Code of Conduct: http://python.org/psf/codeofconduct/
