creating a dictionary with list of lists in python,{d[0]: (' '.join(d[1:]) if d[1:] else 0) for d in data}