I have a list where it consists of a list inside a list. The inner list contains two items with inner_list[0] is an identifier/key and inner_list[1] is the corresponding value. I would like to put them into a dictionary where values that shares the same key will be appended to the same key.
An example:
list = [['Jan', 'Jim'], ['Feb', 'Maggie'], ['Jan', 'Chris'], ['Sept', 'Joey'],..['key', 'value']]
The outcome I was looking for:
Jan = ['Jim', 'Chris']
Feb = ['Maggie']
Sept = ['Joey']
Any ideas I can do this elegantly in Python?
tupleif it is up to you)