I have a list:
A = ['a-1', 'b-1', 'c-2', 'c-1', 'a-2']
What is the pythonic way (I don't want to use lots of nested for loops) of aggregating the data in a dictionary (or any other data structure) to get a result like:
{
'a': ['1', '2'],
'b': ['1'],
'c': ['1', '2'],
}