Исправление MadMax, 04.06.25 18:07 (текущая версия) :
https://docs.python.org/3/library/itertools.html#itertools.groupby
Пардон https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.partition
Исходная версия MadMax, 04.06.25 18:01: