summaryrefslogtreecommitdiff
path: root/progs/a177.py
blob: 8479a420fba73e0100ff50b29ab420a8c565cbe3 (plain)
1
2
3
from itertools import groupby
def pack_consecutive_duplicates(list1):
    return [list(group) for key, group in groupby(list1)]