diff options
Diffstat (limited to 'progs/a177.py')
-rw-r--r-- | progs/a177.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/a177.py b/progs/a177.py new file mode 100644 index 0000000..8479a42 --- /dev/null +++ b/progs/a177.py @@ -0,0 +1,3 @@ +from itertools import groupby
+def pack_consecutive_duplicates(list1):
+ return [list(group) for key, group in groupby(list1)]
\ No newline at end of file |