def reduceTuple(input_list): 
    """ Idea taken from https://www.geeksforgeeks.org/python-group-tuples-in-list-with-same-first-value/ """ 
    out = {} 
    for elem in input_list: 
        try: 
            out[elem[0]].extend(elem[1:]) 
        except KeyError: 
            out[elem[0]] = list(elem) 

    return [tuple(values) for values in out.values()]