summaryrefslogtreecommitdiff
path: root/progs/dont_care/a780.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/dont_care/a780.py')
-rw-r--r--progs/dont_care/a780.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/dont_care/a780.py b/progs/dont_care/a780.py
new file mode 100644
index 0000000..e84f8ee
--- /dev/null
+++ b/progs/dont_care/a780.py
@@ -0,0 +1,8 @@
+def group_tuples(Input):
+ out = {}
+ for elem in Input:
+ try:
+ out[elem[0]].extend(elem[1:])
+ except KeyError:
+ out[elem[0]] = list(elem)
+ return [tuple(values) for values in out.values()] \ No newline at end of file