I am looking for a fast method of creating large key-value pairs that I can simply loop through later on.
key = {'a':'stuff', 'a':'more stuff', 'a':'dont look at me', 'b':'test2', 'b':'test3',...'z':'even more stuff'}
for a,b in key
#do stuff
I am looking to condense the reference to a into a single statement.
I need a in this case to be the key and look through grabbing all the values of b that correspond to the current a. This is really just readability for later code however if there are other suggestions that can accomplish this task easier that would be great.
You could do something like: