summaryrefslogtreecommitdiff
path: root/progs/dont_care/a780.py
blob: e84f8ee51b162c95e8cdae865b6c561ae3a6c629 (plain)
1
2
3
4
5
6
7
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()]